随笔分类 -  项目技术

1
该文被密码保护。
posted @ 2011-12-23 18:12 勇气 阅读(6) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-23 15:24 勇气 阅读(4) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-23 15:04 勇气 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-23 14:46 勇气 阅读(1) 评论(0) 推荐(0)
摘要:http://www.cnblogs.com/JamesLi2015/archive/2011/12/23/2298825.html 阅读全文
posted @ 2011-12-23 11:19 勇气 阅读(252) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-22 18:12 勇气 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-22 12:14 勇气 阅读(2) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-12-22 10:37 勇气 阅读(6) 评论(0) 推荐(0)
摘要:把当前日期转换成指定格式:DateTime.Now.ToString("yyyyMMdd", DateTimeFormatInfo.InvariantInfo) 阅读全文
posted @ 2011-12-14 10:57 勇气 阅读(182) 评论(0) 推荐(0)
摘要:foreach (DataRow dr in dtQuery.Rows) { if (Convert.ToBoolean(dr["xz2"].ToString())) { //drcm = dt.Select("AccountName=" + dr["AccountName"].ToString()); //if (drcm.Length > 0) //{ // Common.AdCommon.ShowError("帐户为"+dr["AccountName"].ToString()+&qu 阅读全文
posted @ 2011-09-08 14:51 勇气 阅读(484) 评论(0) 推荐(0)
摘要:CREATE procedure [dbo].[GT_QueryPayUnit](@CName varchar(50),@TableName varchar(50))asbegindeclare @Sql varchar(4000)set @sql='select Id,'+@CName+' as Unitfrom '+@TableName+''exec (@sql)end 阅读全文
posted @ 2011-08-10 17:44 勇气 阅读(397) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-07-05 09:48 勇气 阅读(0) 评论(0) 推荐(0)
摘要:--sql对字符串的处理能力比较弱,比如我要循环遍历象1,2,3,4,5这样的字符串,如果用数组的话,遍历很简单,但是t-sql不支持数组,所以处理下来比较麻烦。下边的函数,实现了象数组一样去处理字符串。一,用临时表作为数组create function f_split(@c varchar(2000),@split varchar(2)) returns @t table(col varchar(20)) as begin while(charindex(@split,@c)<>0) begin insert @t(col) values (substring(@c,1,char 阅读全文
posted @ 2011-06-14 10:47 勇气 阅读(316) 评论(0) 推荐(0)
摘要:declare @split varchar(2)set @split=','while(CHARINDEX(@split,@SalesDate)<>0)begininsert into SP_SpecialsCommodityEveryday(S_Id,C_Id,SalesWeek,LimitAmount)values(@return_Id,@C_Id,substring(@SalesDate,1,charindex(@split,@SalesDate)-1),@LimitAmount)IF( @@ERROR <> 0 )BEGINGOTO Clean 阅读全文
posted @ 2011-06-14 10:45 勇气 阅读(323) 评论(0) 推荐(0)
摘要:declare @sqlstr varchar(max), @querywhere varchar(max)--set @querywhere='where BarCode like ''%9%'''set @querywhere='where BarCode =''9'''set @sqlstr='select distinct 0 as ttype,s.Id,s.StoreNo as tNo,s.StoreName as tName,s.Provinces,s.City,s.Region 阅读全文
posted @ 2011-06-11 14:52 勇气 阅读(253) 评论(0) 推荐(0)
摘要:if(Convert.ToBoolean(dtSac.Rows[i]["ChangeIt"].ToString())){ Common.AdCommon.ShowInformation(string.Format("此店{0}已生效,不可删除",dtSac.Rows[i]["StoreName"].ToString())); return;} 阅读全文
posted @ 2011-06-10 14:33 勇气 阅读(121) 评论(0) 推荐(0)
摘要:先列出正确的写法,如果你只想马上改错就先复制吧,Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->protectedvoiddeleteDataRow(intRowID,DataTabledt){for(inti=dt.Rows.Count-1;i>=0;i--){if(Convert.ToInt32(dt.Rows[i]["RowID"])==RowID)dt.Rows.RemoveAt(i);}}如果你有时间想学习 阅读全文
posted @ 2011-05-16 11:59 勇气 阅读(497) 评论(0) 推荐(0)
摘要:string Qstr = null; foreach (DataRow dr in dt.Rows)//把获取的dt中的Id赋给字符串,用字符串传递 { Qstr += dr["PS_Id"].ToString() + ","; } //去除字符串后面的“,” if (Qstr == null) { Common.AdCommon.ShowError("该店没有下属店"); } else { Qstr = Qstr.Remove(Qstr.Length - 1); dt = bllPassive.SelectStore(Qstr); 阅读全文
posted @ 2011-05-14 20:05 勇气 阅读(206) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-05-10 10:16 勇气 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2011-05-10 10:00 勇气 阅读(2) 评论(0) 推荐(0)

1