随笔分类 - ASP.Net MVC
摘要:private void OnError(ActionExecutedContext filterContext) { string htmlMsg = @""; var request = filterContext.RequestContext.HttpContext.Request; ...
阅读全文
摘要:private static string Host = System.Configuration.ConfigurationManager.AppSettings["SMTPURL"].ToString(); //SMTP服务器地址 private static string Account =
阅读全文
摘要:From表单转化为对象 public static T RequestFormEntities<T>(HttpRequestBase request) where T : new() { T entity = Activator.CreateInstance<T>(); PropertyInfo[]
阅读全文
摘要:DataTable转List public static List<T> ToListModel<T>(this DataTable table) where T : new() { var type = typeof(T); var properties = type.GetProperties(
阅读全文
摘要:自动生成BaseController注入业务接口 public static string DataTableToAutoface(DataTable dt,string nameSpace) { StringBuilder sb = new StringBuilder(); StringBuild
阅读全文
摘要:业务层接口 public static string DataTableToBaseIService(string tableName, string nameSpace, string className) { var table = SqlTableHelper.GetSQLTableInfo(
阅读全文
摘要:生成接口类 public static string DataTableToBaseIService(string tableName, string nameSpace, string className) { var table = SqlTableHelper.GetSQLTableInfo(
阅读全文
摘要:获取数据库表名、表结构 public static DataTable GetSqlTables(string filterSql) { StringBuilder sb = new StringBuilder(); sb.Append(" select name from sysobjects w
阅读全文
摘要:web.config里配置如下: <system.webServer> <modules> <remove name="WebDAVModule"/> </modules> <handlers> <remove name="ExtensionlessUrlHandler-Integrated-4.0
阅读全文
浙公网安备 33010602011771号