protected void m_grid_RowDeleting(object sender, GridViewDeleteEventArgs e) { string message = ""; try { SectionErrorType m_SectionErrorType = new SectionErrorType(); m_SectionErrorType.SectionErrorTypeId = System.Int32.Parse(m_grid.DataKeys[e.RowIndex].Value.ToString()); m_SectionErrorType.Delete(); } catch (Exception ex) { sms.utils.Log.writeLog(ex.ToString(), ((new System.Diagnostics.StackTrace()).GetFrames()[0]).GetMethod().Name); } ShowGrid(); }
protected void lbDelete_Click(object sender, EventArgs e) { try { SectionErrorType m_SectionErrorType = new SectionErrorType(); foreach (GridViewRow m_Row in m_grid.Rows) { CheckBox chkAction = (CheckBox)m_Row.FindControl("chkAction"); if (chkAction != null) { if (chkAction.Checked) { m_SectionErrorType.SectionErrorTypeId = System.Int32.Parse(m_grid.DataKeys[m_Row.RowIndex].Value.ToString()); m_SectionErrorType.Delete(); } } } ShowGrid(); } catch (Exception ex) { sms.utils.Log.writeLog(ex.ToString(), ((new System.Diagnostics.StackTrace()).GetFrames()[0]).GetMethod().Name); } }