Ejemplo n.º 1
0
 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.FetchQualData();
     PopulateDataGrid(dsGridResults, grdEstimateMaterials);
 }
Ejemplo n.º 2
0
 public void grdEstimateMaterials_CancelCommand(object sender, DataGridCommandEventArgs e)
 {
     contingency _wc = new contingency();
     grdEstimateMaterials.ShowFooter = true;
     grdEstimateMaterials.EditItemIndex = -1;
     DataSet dsGridResults = _wc.FetchQualData();
     PopulateDataGrid(dsGridResults, grdEstimateMaterials);
 }
Ejemplo n.º 3
0
 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.DeleteQuals(Convert.ToInt32(DetailId));
     _wc.DeleteSubQualsForQual(Convert.ToInt32(DetailId));
     DataSet dsGridResults = _wc.FetchQualData();
     PopulateDataGrid(dsGridResults, grdEstimateMaterials);
 }
Ejemplo n.º 4
0
 public void grdEstimateMaterials_UpdateCommand(object sender, DataGridCommandEventArgs e)
 {
     String DetailId = grdEstimateMaterials.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString();
     contingency _wc = new contingency();
     _wc.UpdateTerms(Convert.ToInt32(DetailId), ((TextBox)(e.Item.FindControl("txtdesc"))).Text);
     grdEstimateMaterials.EditItemIndex = -1;
     grdEstimateMaterials.ShowFooter = true;
     DataSet dsGridResults = _wc.FetchQualData();
     PopulateDataGrid(dsGridResults, grdEstimateMaterials);
 }
Ejemplo n.º 5
0
    protected void Page_Load(object sender, EventArgs e)
    {
        contingency _wc = new contingency();
        if (!Page.IsPostBack)
        {

            try
            {
                grdEstimateMaterials.PageSize = _DEFAULTPAGESIZE;
                DataSet dsGridResults = _wc.FetchQualData();
                PopulateDataGrid(dsGridResults, grdEstimateMaterials);

            }
            catch (Exception exp)
            {
                Response.Write(exp.Message.ToString());
            }
        }
    }