随笔分类 -  c#

摘要:Code: /// <summary> /// 导出word /// </summary> /// <param name="id"></param> /// <returns></returns> [HttpGet] [Route("api/Values/Todoc")] public HttpR 阅读全文
posted @ 2020-11-13 14:25 芮源 阅读(738) 评论(0) 推荐(0)
摘要:数据结构接口: /// <summary> /// 实体类必须实现接口 /// </summary> public interface IToTreeModel { int Id { get; set; } int ParentId { get; set; } List<IToTreeModel> 阅读全文
posted @ 2020-11-05 18:27 芮源 阅读(639) 评论(0) 推荐(0)
摘要:方法: /// <summary> /// 实体类复制 /// </summary> /// <param name="objold"></param> public static dynamic EntityCopy(object objone, object objtow) { dynamic 阅读全文
posted @ 2020-11-04 18:04 芮源 阅读(348) 评论(0) 推荐(0)
摘要:通过Session传值 public string SessionUser { get { return (string)Session["SessionUser"]; } set { Session["SessionUser"] = value; } } Gloab文件 //在Global文件里中 阅读全文
posted @ 2020-04-14 11:46 芮源 阅读(288) 评论(0) 推荐(0)
摘要:。 public partial class Form2 : Form { public Form2() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { var srcImage 阅读全文
posted @ 2020-03-07 23:31 芮源 阅读(2363) 评论(0) 推荐(1)
摘要:get: @Test public void getParams() { // 获取连接客户端工具 CloseableHttpClient httpClient = HttpClients.createDefault(); String entityStr = null; CloseableHttp 阅读全文
posted @ 2020-01-07 16:42 芮源
摘要:偷的 前台: <script type="text/javascript"> function zLoginCheck() { var Account = 'admin; var Password = 'DC483E80A7A0BD9EF71D8CF973673924'; var str = { A 阅读全文
posted @ 2020-01-07 16:33 芮源
摘要:修改文件夹 C:\Documents and Settings\All Users\Application Data 的访权限 显示安全文件=》属性=》安全=》高级=》Everyone=》编辑权限为访问 C:\Documents and Settings\All Users\Application  阅读全文
posted @ 2019-12-10 18:03 芮源 阅读(2047) 评论(0) 推荐(0)
摘要:eg: List<string> listA = new List<string> {"1","2","3"}; List<string> listB = new List<string> {"2","4","17"}; List<string> Result = listA.Union(listB 阅读全文
posted @ 2019-12-02 10:47 芮源 阅读(932) 评论(0) 推荐(0)
摘要:window下的的tcp通信,有改动 服务端: public static class SocketServer { private static readonly Logger logger = LogManager.GetLogger("DefaultLog"); /// <summary> / 阅读全文
posted @ 2019-11-28 17:14 芮源 阅读(202) 评论(0) 推荐(0)
摘要:public class Tool { ////Donet2.0 需要添加引用 // 从一个对象信息生成Json串 public static string ObjectToJson(object obj) { return JsonConvert.ToString(obj); } // 从一个Js 阅读全文
posted @ 2019-11-28 17:09 芮源 阅读(513) 评论(0) 推荐(0)
摘要:/// <summary> /// 创建lambda表达式:p=>p.propertyName == propertyValue /// </summary> /// <typeparam name="T"></typeparam> /// <param name="column"></param> 阅读全文
posted @ 2019-11-28 16:00 芮源 阅读(248) 评论(0) 推荐(0)
摘要://源数据 List<object> li = new List<object>(); foreach (var i in list) { li.Add(new { Id = i.Id, Name = i.Name }); } //需要过渡的实体 class TruckTeam { public s 阅读全文
posted @ 2019-09-25 19:24 芮源 阅读(1224) 评论(0) 推荐(0)
摘要:public class sqlclass { //复制大量数据 public static void BulkToDB(DataTable dt, string TableName) { SqlConnection sqlConn = new SqlConnection(Configuration 阅读全文
posted @ 2019-09-18 16:33 芮源
摘要:StringBuilder str = new StringBuilder(); str.Append(DateTime.Now.Millisecond); string url = "/Content/" + str + ".xlsx"; var path = Server.MapPath(url 阅读全文
posted @ 2019-09-18 15:05 芮源
摘要:public ActionResult GetIndex() { CRMEntities db = new CRMEntities(); EasyUIJsonTree root = new EasyUIJsonTree() { text = "菜单根节点" }; IList<Trees> list 阅读全文
posted @ 2019-09-17 17:42 芮源
只有注册用户登录后才能阅读该文。
posted @ 2019-09-03 08:51 芮源
摘要:public class message { private string _caption; public void Show(string text, string caption, int timeout) { this._caption = caption; StartTimer(timeo 阅读全文
posted @ 2019-09-02 14:44 芮源
摘要:HttpWebRequest和HttpWebResponse类是用于发送和接收HTTP数据的最好选择。它们支持一系列有用的属性。这两个类位 于System.Net命名空间,默认情况下这个类对于控制台程序来说是可访问的。请注意,HttpWebRequest对象不是利用new关键字通过构 造函数来创建的 阅读全文
posted @ 2019-09-02 14:42 芮源
摘要:https://www.cnblogs.com/LL-723/p/4268020.html 阅读全文
posted @ 2019-09-02 14:20 芮源