随笔分类 - .Net
摘要://将202004这样的格式转换为时间格式 DateTime date = DateTime.ParseExact(datetime, "yyyyMM", System.Globalization.CultureInfo.CurrentCulture); //本月天数 int days = Date
阅读全文
摘要:public ReturnModel GetStudent(string json) { ParamsModel model = JsonConvert.DeserializeObject<ParamsModel>(json); //连接对象 using (SqlConnection conn =
阅读全文
摘要:API 控制器1 主要用于增删改查已经反填数据查询 using System; using System.Collections.Generic; using System.Data.SqlClient; using System.Linq; using System.Net; using Syst
阅读全文
摘要:@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Add</title> <link href="~/layui/css/lay
阅读全文
摘要:@{ Layout = null; } <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>Index</title> <link href="~/layui/css/l
阅读全文
摘要:修改App_Start文件夹中的WebApiConfig文件里的Register方法 public static void Register(HttpConfiguration config) { // Web API 配置和服务 GlobalConfiguration.Configuration.
阅读全文
摘要://控制器using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using System.IO;//上传文件的数据流 namespace U
阅读全文
摘要:select UId,UName,stuff((select ','+RName from USER_SHOW where a.UId = UId for xml path('')),1,1,'') as RName from USER_SHOW as a group by UId,UName
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using Dapper; using System.Data.SqlClient;
阅读全文
摘要:public PageModel Get(int PageIndex = 1, int PageSize = 5, int Pid = 0, int Tid = 0, int Gid = 0) { DynamicParameters sp = new DynamicParameters(); sp.
阅读全文
摘要:去web配置里改一下版本 版本不一致 改一下就好了
阅读全文
摘要:/// <summary> /// 过滤特殊字符 /// </summary> /// <param name="s"></param> /// <returns></returns> public static string String2Json(String s) { StringBuilde
阅读全文
摘要:Create table Student ( Id int primary key identity, KM varchar(50), Name varchar(52), Score int ) select * from student 列转行 /*SELECT [姓名], max(CASE 课程
阅读全文
摘要:/// <summary> /// Datatable转换为Json /// </summary> /// <param name="table">Datatable对象</param> /// <returns>Json字符串</returns> public static string ToJs
阅读全文
摘要:public static DataTable ToDataTable<T>(this IEnumerable<T> varlist) { DataTable dtReturn = new DataTable(); // column names PropertyInfo[] oProps = nu
阅读全文
摘要:/// <summary> /// 将List转化为String /// </summary> /// <param name="Lists"></param> /// <param name="ch"></param> /// <returns></returns> public static s
阅读全文
摘要:public string StripHT(string strHtml) //从html中提取纯文本 { Regex regex = new Regex("<.+?>", RegexOptions.IgnoreCase); string strOutput = regex.Replace(strH
阅读全文
摘要:在数据库配置管理器Sql server 网络配置中 mssqlserver协议 里面的全部启用即可
阅读全文
摘要:点击程序包源 添加一个新的路径为https://www.nuget.org/api/v2
阅读全文
摘要:1.引用 ZXing.net 2.控制器代码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ZXing; using Z
阅读全文

浙公网安备 33010602011771号