随笔分类 -  C#

摘要:/// <summary> /// 发送邮件功能,发送邮箱需要开通stmp服务 /// </summary> /// <param name="userEmailAddress">发件人地址</param> /// <param name="userName">发件人姓名(可为空)</param> 阅读全文
posted @ 2019-05-05 20:27 飞刀软件 阅读(228) 评论(0) 推荐(0)
摘要:11111111 11111111 阅读全文
posted @ 2018-11-09 09:37 飞刀软件 阅读(306) 评论(0) 推荐(0)
摘要:业务开发,使用foreach遍历几千条数据,并有一定的业务逻辑处理,执行非常耗时,想了一个优化办法就是使用Parallel.ForEach 并行循环: 正常foreach的写法: #region //foreach (var InspCategItem in InspCategList) //{ / 阅读全文
posted @ 2018-09-12 11:13 飞刀软件 阅读(2158) 评论(0) 推荐(0)
摘要:string 转成 list,可直接通过list的构造函数转换 案例: var RewardLevelIdList = new List<string>(search.RewardLevelIds.Split(',')); 阅读全文
posted @ 2018-04-13 15:50 飞刀软件 阅读(1153) 评论(0) 推荐(0)
摘要:session.OrderBy(m=> m.SubmitStatus.Asc && m.CreateTime.Desc) //正确写法 session.OrderBy(m=> m.SubmitStatus.Asc).OrderBy(m=> m.CreateTime.Desc) //错误写法,第二次排 阅读全文
posted @ 2017-12-27 18:00 飞刀软件 阅读(1336) 评论(4) 推荐(0)
摘要:递归找treeview树可以用如下方法: public JsonResult GetExpenseCatalogConfDataTree() { List<ExpenseCatalogConfModel> list = _serviceExpenseAccount.GetExpenseCatalog 阅读全文
posted @ 2017-12-13 14:39 飞刀软件 阅读(128) 评论(0) 推荐(0)
摘要:double percent = (double)alreadyRectification / (alreadyRectification + noRectification); ViewData["rectificationCompletionRate"]= percent.ToString("0 阅读全文
posted @ 2017-05-22 17:12 飞刀软件 阅读(466) 评论(0) 推荐(0)
摘要:编程用何种语言不重要,重要的是其设计思想。 阅读全文
posted @ 2017-03-15 16:27 飞刀软件 阅读(172) 评论(0) 推荐(0)