上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 40 下一页
摘要: private DataSet ListToDataSet(IList<Asset> list) { DataSet mResult = new DataSet(); if (list != null) { var newList = from l in list select new { ... 阅读全文
posted @ 2013-01-25 15:52 xust 阅读(152) 评论(0) 推荐(0)
摘要: // lambda 表达式 分组,并且分页 /// <summary> /// 获取所有组织机构数据(按价格名称分组) /// </summary> /// <returns></returns> public string PriceStandardSelectAllGroupBy() { IList<PriceStandard> mPriceStandards = new List<PriceStandard>(); IList<PriceStandar... 阅读全文
posted @ 2013-01-25 15:50 xust 阅读(740) 评论(0) 推荐(0)
摘要: 1. <?xml version="1.0" encoding="UTF-8" ?><sqlMap namespace="User" xmlns="http://ibatis.apache.org/mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > <alias> <typeAlias alias="StgImpBalanceGoods" type=&quo 阅读全文
posted @ 2013-01-25 15:48 xust 阅读(243) 评论(0) 推荐(0)
摘要: IAllotService AllotSrv = new AllotService(); var mId = Request.QueryString["id"]; if (String.IsNullOrEmpty(mId)) return; var mAllot = AllotSrv.GetById(mId); List<Allot> mAllots = new List<Allot>(); mAllots.Add(mAllot); ... 阅读全文
posted @ 2013-01-25 15:45 xust 阅读(538) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取所有数据 /// </summary> /// <returns></returns> public string GetComboDataPayPrePay() { IList<Hashtable> mHashtables = new List<Hashtable>(); int mTotal = 0; int mStart = 0; int mLimt = 0; ... 阅读全文
posted @ 2013-01-25 15:42 xust 阅读(936) 评论(0) 推荐(0)
摘要: 1. 可空类型 Decimal? 允许值为null,默认值为null 如:public Decimal? orderQuantity { get; set; } 默认值为null public Decimal orderQuantity { get; set; } 默认值为0.0解决问题:之前遇到的 Specified cast is not valid. 错误是因为 没有使用 可空类型 引起的,同时也解决了 做数值类型查询时,数值的默认值的问题。 阅读全文
posted @ 2013-01-25 15:41 xust 阅读(146) 评论(0) 推荐(0)
摘要: --比较下面两段sql 执行效率select * from DC_Keyword where nick='绿鸽鞋类专营店' and campaign_id=6852747and adgroup_id=160206338 and keyword_id is not null and data_time in (select MAX(data_time) from DC_Keyword where nick='绿鸽鞋类专营店')--特别是当用到子查询的时候,在子查询语句中 where 条件尽可能多 查询效率越快select * from DC_Keyword whe 阅读全文
posted @ 2013-01-22 16:23 xust 阅读(151) 评论(0) 推荐(0)
摘要: update DC_Keyword set wordStatus='已启用'where word = '类目出价' and wordStatus=''select a.data_time,a.campaign_id,a.adgroup_id,a.nick,b.word,b.wordStatus,--a.isUseCategoryPrice,case b.wordStatus when '未启用' then 0else 1 end NewIsUseCategoryPriceINTO #TEMP111from DC_ADGroup a 阅读全文
posted @ 2013-01-21 14:22 xust 阅读(2360) 评论(0) 推荐(0)
摘要: #if DEBUG,这个东东其实以前刚开始学习C#的时候就知道了,也知道怎么用,但就是没有使用过。随想,很多人估计也都没有用过吧(嘿,自我安慰下)。最近看MVVMLight的代码时看到#if SILVERLIGHT的东东,于是想起来#if debug来了,于是在代码中疯狂的使用:设置下用户名和密码,免得每次都输入#if DEBUG UserID = "abc@abc.com"; Password = "123456";#endif设置下登陆状态,免得每次都要登陆#if DEBUG IsLogin = true;#elif ......#endif输出异常 阅读全文
posted @ 2013-01-18 16:31 xust 阅读(180) 评论(0) 推荐(0)
摘要: Is there any difference betweenSqlCommand.CommandTimeoutandSqlConnection.ConnectionTimeoutin .NET?Yes.CommandTimeoutis how long a single command can take to complete.ConnectionTimeoutis how long it can take to establish a connection to the server to start with.For instance, you may be executing rela 阅读全文
posted @ 2013-01-18 15:26 xust 阅读(431) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 40 下一页