protected void grdComments_RowDeleting(object sender, GridViewDeleteEventArgs e) { // Comments Gridview, if the gridview is edition mode if (grdComments.EditIndex >= 0) { grdComments.UpdateRow(grdComments.EditIndex, true); } // Delete comments int workId = (int)e.Keys["WorkID"]; int refId = (int)e.Keys["RefID"]; int companyId = Int32.Parse(hdfCompanyId.Value); int loginId = Convert.ToInt32(hdfLoginId.Value); bool adminPermission = Convert.ToBoolean(Session["sgLFS_CWP_FULLLENGTHLINING_ADMIN"]); // Delete comment FullLengthLiningWetOutCommentsDetails model = new FullLengthLiningWetOutCommentsDetails(fullLengthLiningTDS); model.Delete(workId, refId, companyId, loginId, adminPermission); // Store dataset Session["fullLengthLiningTDS"] = fullLengthLiningTDS; }