2011年7月6日
摘要: //function function BuildTreeObject(arrayInput,cercle,db){ if(isDefined(arrayInput) && arrayInput.length > 0) { var levelFather = cercle; var levelChild = levelFather +1; for(var i=0; i < arrayInput.length;i++) { // Retreive the Child of the node var queryGetChildNode = 'SELECT * f 阅读全文
posted @ 2011-07-06 21:12 鱼不爱水 阅读(191) 评论(0) 推荐(0)
  2011年7月4日
摘要: declare @uid bigintdeclare cursor_uid cursor for select id from [User] where validity = 1open cursor_uid fetch next from cursor_uid into @uid while @@fetch_status = 0 begin select @uid fetch next from cursor_uid into @uid end close cursor_uiddeallocate cursor_uid 阅读全文
posted @ 2011-07-04 17:41 鱼不爱水 阅读(228) 评论(0) 推荐(0)
  2011年5月17日
摘要: 1)判断两个object 是否相同function areEqual(o1, o2) { var eq = false; if ( (typeof (o1) == 'string') && (typeof (o2) == 'string') ) { // compare string values eq = (o1.toLowerCase() == o2.toLowerCase()); } else { // compare object references eq = (o1 == o2); } return eq;}2)如何从数组中删除一个已 阅读全文
posted @ 2011-05-17 21:00 鱼不爱水 阅读(153) 评论(0) 推荐(0)
摘要: combo.cache = combo.cache || { QualificationValueIds: [], QualificationsLabels: [], remove: function(record) { var idL = this.QualificationValueIds.length, i = 0; for (i = 0; i < idL; i++) { if (this.QualificationValueIds[i] == record.data.ID) { this.QualificationValueIds.splice(i, 1); } } var ti 阅读全文
posted @ 2011-05-17 17:17 鱼不爱水 阅读(241) 评论(0) 推荐(0)
  2011年4月28日
摘要: //从form 中获取fileDataHttpFileCollection files = Request.Files;byte[] fileData = new byte[files[0].ContentLength];files[0].InputStream.Read(fileData, 0, fileData.Length);void FileStateHandle(string connstr, OptType opt, string fileName,byte[] fileData, string state, string message) { SqlConnection sqlc 阅读全文
posted @ 2011-04-28 22:04 鱼不爱水 阅读(1422) 评论(2) 推荐(0)
  2011年4月27日
摘要: 1 创建一个connectionstring connstr = ConfigurationManager.ConnectionStrings["default"].ConnectionString;SqlConnection sqlconn = new SqlConnection(connstr);2 创建一个command 连接到 connection上SqlCommand cmd = new SqlCommand();cmd.Connection = sqlconn;3 创建一个 transaction 当 connection 打开的时候将事务和connection 阅读全文
posted @ 2011-04-27 23:17 鱼不爱水 阅读(288) 评论(0) 推荐(0)
  2011年4月26日
摘要: SqlConnection con = null; SqlCommand cmd = null; try { con = new SqlConnection(ConfigHelper.ConnectionStrings.Default); con.Open(); cmd = new SqlCommand("ps_Fwk_InsertDiagnostic", con); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add(new SqlParameter("Category", 阅读全文
posted @ 2011-04-26 15:23 鱼不爱水 阅读(2597) 评论(0) 推荐(0)
  2011年4月14日
摘要: string[] getDirectoryFiles(string dirVPath, string pattern) { string dirVPathRooted = string.Concat( HttpContext.Current.Request.ApplicationPath.ToLower(), dirVPath); string dirPath = HttpContext.Current.Server.MapPath(dirVPathRooted); string[] files = Directory.GetFiles(dirPath, pattern, SearchOpti 阅读全文
posted @ 2011-04-14 17:36 鱼不爱水 阅读(818) 评论(0) 推荐(0)
  2011年4月7日
摘要: DECLARE @From DATETIME SET @From = CAST(@FromDate + 'T00:00:00' AS DATETIME) select ??? 1/ nullif ( ??? 2 ,0 ) as result from table; 阅读全文
posted @ 2011-04-07 00:24 鱼不爱水 阅读(148) 评论(0) 推荐(0)
  2011年4月6日
摘要: self.tmlOnLoading = new Ext.XTemplate('<div class="x-mask-loading2">{msg}</div>'); 阅读全文
posted @ 2011-04-06 22:49 鱼不爱水 阅读(158) 评论(0) 推荐(0)