sp; } TableCell[] cell2=new TableCell[6]; for(int i=0;i<cell2.Length;i++) { cell2[i]=new TableCell(); } cell2[0].Text="计划进度"; cell2[1].Text="实际进度"; cell2[2].Text="巷道累计"; cell2[3].Text="进尺长度"; cell2[4].Text="毛面"; cell2[5].Text="成型"; for(int i=0;i<cell2.Length;i++) { dgi2.Cells.Add(cell2[i]); } tb.Rows.AddAt(0,dgi1); tb.Rows.AddAt(1,dgi2); } e.Item.Cells[1].Visible=false; } private void Calendar1_SelectionChanged(object sender, System.EventArgs e) { this.Session["dataset"]=null; this.InitData(); } private void delbutton_Click(object sender, EventArgs e) { Button tmpbutton=(Button)sender; string id=tmpbutton.ID; id=id.Remove(id.Length-1,1); string sqlcmd="delete from dayenter where id="+id; string connstring="workstation id=SERVER;packet size=4096;user id=sa;data source=''''.'''';persist security info=True;initial catalog=winneroa;password=pxh2003"; SqlConnection conn=new SqlConnection(connstring); try { conn.Open(); } catch(Exception err) { Response.Write(err.ToString()); } SqlCommand cmd=new SqlCommand(sqlcmd,conn); try { cmd.ExecuteNonQuery(); this.Session["dataset"]=null; this.InitData(); } catch(Exception err) { Response.Write(err.ToString()+sqlcmd); } finally { conn.Close(); } } } }
上一页 [1] [2] [3] |