05 2012 档案

摘要:方法1~ !string.IsNullOrEmpty()1 if (!string.IsNullOrEmpty(System.Web.HttpContext.Current.Request.QueryString["id"]))2 {3 Convert.ToInt32(Request.QueryString["id"]);4 } 方法2~ try{} catch{}1 try2 {3 model_weekplandetails.constructiion_complete_time = DateTime.Parse(ds.Tables[0].Rows[i 阅读全文
posted @ 2012-05-11 00:05 phoenix_fling 阅读(1056) 评论(0) 推荐(0)
摘要:(转)A、B两表,找出ID字段中,存在A表,但是不存在B表的数据。A表总共13w数据,去重后大约3W条数据,B表有2W条数据,且B表的ID字段有索引。方法一 使用 not in ,容易理解,效率低 ~执行时间为:1.395秒~1 select distinct A.ID from A where A.ID not in (select ID from B)方法二 使用 left join...on... , "B.ID isnull" 表示左连接之后在B.ID 字段为 null的记录 ~执行时间:0.739秒~1 select A.ID from A left join B 阅读全文
posted @ 2012-05-09 16:32 phoenix_fling 阅读(13750) 评论(1) 推荐(1)
摘要:前台代码: 1 <asp:GridView ID="gv_demonstrate_for_planning_item" runat="server" 2 AutoGenerateColumns="False" OnRowDeleting="gv_RowDeleting"> 4 <RowStyle BackColor="#EFF3FB" /> 5 <Columns> 6 <asp:BoundField HeaderText="施工单位" 阅读全文
posted @ 2012-05-09 11:46 phoenix_fling 阅读(560) 评论(0) 推荐(0)
摘要:界面上的内容1 <asp:DropDownList ID="company" runat="server" AppendDataBoundItems=true>2 <asp:ListItem Selected="true">-请选择-</asp:ListItem>3 </asp:DropDownList>后台代码1 for (int i = company.Items.Count - 1; i > 0; i--)2 {3 company.Items.RemoveAt(i);4 .. 阅读全文
posted @ 2012-05-07 11:44 phoenix_fling 阅读(335) 评论(0) 推荐(0)