public void grdEstimateMaterials_EditCommand(object sender, DataGridCommandEventArgs e) { contingency _wc = new contingency(); grdEstimateMaterials.ShowFooter = false; grdEstimateMaterials.EditItemIndex = Convert.ToInt32(e.Item.ItemIndex); DataSet dsGridResults = _wc.FetchTermsData(); PopulateDataGrid(dsGridResults, grdEstimateMaterials); }
public void grdEstimateMaterials_CancelCommand(object sender, DataGridCommandEventArgs e) { contingency _wc = new contingency(); grdEstimateMaterials.ShowFooter = true; grdEstimateMaterials.EditItemIndex = -1; DataSet dsGridResults = _wc.FetchTermsData(); PopulateDataGrid(dsGridResults, grdEstimateMaterials); }
public void grdEstimateMaterials_DeleteCommand(object sender, DataGridCommandEventArgs e) { contingency _wc = new contingency(); String DetailId = ""; DetailId = grdEstimateMaterials.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); Whitfieldcore _dbClass = new Whitfieldcore(); _wc.DeleteTerms(Convert.ToInt32(DetailId)); _wc.DeleteSubTermsForTems(Convert.ToInt32(DetailId)); DataSet dsGridResults = _wc.FetchTermsData(); PopulateDataGrid(dsGridResults, grdEstimateMaterials); }
protected void Page_Load(object sender, EventArgs e) { contingency _wc = new contingency(); if (!Page.IsPostBack) { try { grdEstimateMaterials.PageSize = _DEFAULTPAGESIZE; DataSet dsGridResults = _wc.FetchTermsData(); PopulateDataGrid(dsGridResults, grdEstimateMaterials); } catch (Exception exp) { Response.Write(exp.Message.ToString()); } } }