判断一个人的体重是否为标准体重计算公式:男生:体重(kg)-身高+100=±3(在此范围内为标准体重) 女生:体重(kg)-身高+110=±3using System;using System.Collections.Generic;using System.Diagnostics...
groupList是原始数据集合,ListsortOrder是排序类型,desc 或者ascsortName是排序属性名称1.使用反射。private static object GetPropertyValue(object obj, string property){ System.R...
MVC中Model BLL层Model模型互转一. 模型通常可以做2种:充血模型和失血模型,一般做法是模型就是模型,不具备方法来操作,只具有属性,这种叫做失血模型(可能不准确);具备对模型一定的简单操作方法,不只是有属性的模型叫做充血模型,如下:using System;using System.C...
分类:
Web程序 时间:
2015-02-28 18:14:29
阅读次数:
184
/// /// 将DataTalbe导出到Excel中/// /// /// 生成的Excel的Sheet的名字/// 保存的路径publicstaticvoidExport(System.Data.DataTable dt, stringfilePath){if(dt == null){throw...
分类:
其他好文 时间:
2015-02-28 18:10:11
阅读次数:
118
一、简单介绍 using System.Xml;// 初始化一个xml实例XmlDocument xml=new XmlDocument(); // 导入指定xml文件xml.Load(path);xml.Load(HttpContext.Current.Server.MapPath("~/file...
分类:
Web程序 时间:
2015-02-28 16:08:12
阅读次数:
140
解决办法:1、web.config --> 指定网站2、System.Web.Http.Cors3、扩展
掠过架构化异常处理不谈,接下来主要介绍CLR怎样通过垃圾回收来管理已分配的类实例(对象)。C#程序员从来不直接在内存中删除一个托管对象,相反,.net对象被分配到了一块叫做托管堆的内存区域上,到了某个时候他们被垃圾回收期自动销毁。及时释放内部非托管资源:使用System.Object.Fimaliz...
分类:
其他好文 时间:
2015-02-28 16:02:03
阅读次数:
122
using相当存取不同类型的仓库using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using N1;namespace Text...
分类:
其他好文 时间:
2015-02-28 15:51:19
阅读次数:
132
意外停电一次,CentOS启动时报如下错误:
unexpected inconsistency;RUN fsck MANUALLY
An error occurred during the filesystem check
Propping you to shell the system will reboot
when you leave the shell
Give root password for mantennance...
分类:
系统相关 时间:
2015-02-28 14:37:58
阅读次数:
242
/// /// /// /// /// public static System.Data.DataTable ReadExcel(String strFileName) { Wor...
分类:
Web程序 时间:
2015-02-28 14:20:39
阅读次数:
200