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]
Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved. 闵涛 E_mail:admin@mintao.net(欢迎提供学习资源)
鄂公网安备 42011102001154号
站长:MinTao ICP备案号:鄂ICP备11006601号-18