摘要: //1.this.dataGridView1.DataSource = null;//会将DataGridView的列也删掉 //2.this.dataGridView1.Columns.Clear(); //异常 //3.重新绑定之前的DataTable,然后清除DataTable中的数据完美解决 DataTable dt = (DataTable)dataGridView1.Dat... 阅读全文
posted @ 2016-07-22 16:07 会弹猫的吉他 阅读(4498) 评论(0) 推荐(0) 编辑
摘要: //ThreadPool System.Net.ServicePointManager.DefaultConnectionLimit = 200; 阅读全文
posted @ 2016-07-21 17:48 会弹猫的吉他 阅读(294) 评论(0) 推荐(0) 编辑
摘要: --常用日期转换参数: PRINT CONVERT(varchar, getdate(), 120 ) 2016-07-20 16:09:01 PRINT replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','') 20040912110608 PRINT CONVERT(varchar(... 阅读全文
posted @ 2016-07-20 17:47 会弹猫的吉他 阅读(429) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获取客户端Ip /// </summary> /// <returns></returns> public static string GetClientIp() { String clientIP = string.Empty; if (System.Web.H 阅读全文
posted @ 2016-07-20 17:42 会弹猫的吉他 阅读(384) 评论(0) 推荐(0) 编辑
摘要: 解决方案:IIS——应用程序池——高级设置——启用32位应用程序 :true。 阅读全文
posted @ 2016-07-20 17:34 会弹猫的吉他 阅读(217) 评论(0) 推荐(0) 编辑
摘要: private static double Scanner(string ip, int port) { try { System.Net.Sockets.TcpClient Tcp = new System.Net.Sockets.TcpClient(); Syste... 阅读全文
posted @ 2016-07-20 14:16 会弹猫的吉他 阅读(798) 评论(0) 推荐(0) 编辑
摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; namespace Interfaces_Helper { public delegate string DoHandler(string HttpItemXml); ... 阅读全文
posted @ 2016-07-19 08:53 会弹猫的吉他 阅读(1266) 评论(0) 推荐(0) 编辑
摘要: select T.*,P.ProductName from (select V.CompanyID,C.CompanyName,V.ProductCode from VehicleInsuranceAgentConfiguration V inner join Company C on V.CompanyID = C.CompanyID where V.IsDelete=0 and V.Ho... 阅读全文
posted @ 2016-07-18 16:27 会弹猫的吉他 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 1: SELECT TOP 1 P.* FROM [ProxyServer] P JOIN (SELECT RAND()*100 AS Nid) T ON P.[Id]>T.Nid WHERE P.Cookie'' and P.CompanyID=1069 and P.ProductCode='TPCX'2: SELECT TOP 1 * FROM [ProxyServer] WHE... 阅读全文
posted @ 2016-07-18 16:23 会弹猫的吉他 阅读(257) 评论(0) 推荐(0) 编辑
摘要: //查询List是否含有某个值 bool IsContains = Lists.Exists((x)=>x=="B11"); //List重新排序 List arr = new List() { 11, 2, 13, 4, 5, 6, 7 };//1. var re =arr.OrderBy(g => g);//2. var ree = from g in arr orderby g... 阅读全文
posted @ 2016-07-14 11:47 会弹猫的吉他 阅读(195) 评论(0) 推荐(0) 编辑