摘要:
/// /// 导出Excel 方法1 /// /// public ActionResult ExportExcel() { List listdata=new List(); //listdata = GetListData(); DataSet ds = GetDataSetFormList(listdata); CreateExcelFromDatatable(ds.Tables[0], "outPutEx... 阅读全文
摘要:
<script type="text/javascript"> var strdate = new Date(); var begindate = strdate.getTime(); var enddate = begindate + (-7*24*60*60*1000); strdate.setTime(enddate); var dtStart=new Date(strdate); </script> 阅读全文
摘要:
<meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> 阅读全文
摘要:
//需要注意的是在Json字符串中不能出现单引号或者是字符串但不带双引号。<script type="text/javascript"> var jsonstr = '[{"Title":"星期二多云","Content":"是佛时间佛教;"},{"Title":" 第一章","Content":"<strong>多云,微风</strong>"},{"Title& 阅读全文
摘要:
#region 列表序列化成list protected List<T> ToList<T>(string[] listStr) { var list = new List<T>(); foreach (var add in listStr) { if (!string.IsNullOrEmpty(add)) { // T t = SerializeKit.JsonDeserialize<... 阅读全文
摘要:
json字符串格式如:[{"Title":"第零章","Content":"这是内容信息"},{"Title":" 第一章","Content":"<strong>多云,微风</strong>"},{"Title":" 第二章","Content":"降落伞"},{"Title":" 第三章", 阅读全文
摘要:
@{ DateTime nowTime = System.DateTime.Now; } $(function () { var currentDate = '@nowTime.ToString("yyyyMMdd HH:mm:ss")'; var currentYear = '@nowTime.Year'; var currentMonth = '@nowTime.Month'; var currentDay = '@nowTime.Day'; var currentHour = '@nowTime. 阅读全文
摘要:
/// /// 文件下载 /// /// /// /// public FileStreamResult DownLoadFile(string filePath,string fileName) { Stream stream = null; try { if (System.IO.File.Exists(filePath)) { ... 阅读全文
摘要:
/// <summary> /// 压缩图片 /// </summary> /// <returns></returns> public string ResizePic() { #region 压缩图片开始 bool IsImgFile = true; //判断是否为图片文件 string filePathName = "123"; //文件存储的路径(文件夹名称) string fileName = "a.jpg... 阅读全文
摘要:
/// <summary> /// 根据月份和日期计算星座 /// </summary> /// <param name="month"></param> /// <param name="day"></param> /// <returns></returns> public string GetXingZuoByMonthAndDay(int month, int day) { string s = "魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎 阅读全文