protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { Maticsoft.BLL.WorksGroup bll = new Maticsoft.BLL.WorksGroup(); if (Request.Params["id"] != null && Request.Params["id"].Trim() != "") { int ID = (Convert.ToInt32(Request.Params["id"])); bll.Delete(ID); } } }
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e) { Maticsoft.BLL.WorksGroup bll = new Maticsoft.BLL.WorksGroup(); bll.Delete(int.Parse(GridView1.DataKeys[e.RowIndex].Value.ToString())); Bind(); }