07 2021 档案
摘要://获取星期 function getWeek(dateString) { var date; if (isNull(dateString)) { date = new Date(); } else { var dateArray = dateString.split("-"); date = ne
阅读全文
摘要:// 只获得文字去掉标签 function removeTAG(str) { return str.replace(/<[^>]+>/g, ""); }
阅读全文
摘要:// 获取当前日期,格式YYYY-MM-DD function getNowFormatDate() { var date = new Date(); var year = date.getFullYear(); var month = date.getMonth() + 1; if (month
阅读全文
摘要:// 根据身份证计算年龄 function IdCard(value) { var myDate = new Date(); var month = myDate.getMonth() + 1; var day = myDate.getDate(); var age = myDate.getFull
阅读全文
摘要:1. 添加帮助类 DataTableHelper.cs public static class DataTableHelper { /// <summary> /// List转DataTable /// </summary> /// <typeparam name="T"></typeparam>
阅读全文
摘要:1. 添加帮助类 TypeChange.cs public static class TypeChange<T> where T : new() { /// <summary> /// 将DataTable转换为实体列表 /// </summary> /// <param name="dt">待转换
阅读全文
摘要:1. 添加帮助类 EcanRMB.cs public class EcanRMB { /// <summary> /// 转换人民币大小金额 /// </summary> /// <param name="num">金额</param> /// <returns>返回大写形式</returns> p
阅读全文
摘要:场景:公司写的程序老是崩掉,各种改版无果,遂写一个守护进程来监听该程序,如果崩掉,就自动重启。 1. 添加进程管理类 ProcessHelper using System; using System.Collections.Generic; using System.Diagnostics; usi
阅读全文
摘要:一、数据库连接查询数据的步骤(查询单条数据) 1.引用 命名空间 using System.Data.SqlClient; 2.创建 连接字符串 1)SQL Server身份登录验证 string connString = @"Data Source=服务器名;Initial Catalog=数据库
阅读全文
摘要:private static void WriteLog(string errMsg) { //web程序下取得根目录 //string sFilePath = HttpContext.Current.Request.PhysicalApplicationPath + "\\DebugLog"; /
阅读全文
摘要:如上图,我们想查询出所有地区的数据,如果这样查询 select * from dict where parent_id=3 结果: ,肯定不是我们想要的所有子级数据 正确查询方式: with temp as ( select * from dict where parent_id=3 union a
阅读全文
摘要:定义函数: CREATE FUNCTION [dbo].[GetAge] ( @BirthDay nvarchar(20) --生日 ) RETURNS varchar(20) AS BEGIN if(@BirthDay is NUlL or @BirthDay='') return ''; --
阅读全文
摘要:为了简化网络的复杂度,网络通信的不同方面被分解为多层次结构,每一层只与紧挨着的上层或者下层进行交互,将网络分层,这样就可以修改、甚至替换某一层的软件,只要层与层之间的接口保持不变,就不会影响到其他层。 起初网络分层是标准的七层,也就是我们所说的 OSI 七层模型。 后面又简化成了 TCP/IP 五层
阅读全文

浙公网安备 33010602011771号