コード例 #1
0
 public void grdEstimateMaterials_UpdateCommand(object sender, DataGridCommandEventArgs e)
 {
     String DetailId = "";
     DetailId = grdEstimateMaterials.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString();
     Whitfieldcore _wc = new Whitfieldcore();
     _wc.UpdateMaterialinEstimation(Convert.ToInt32(ViewState["EstNum"].ToString()), Convert.ToInt32(DetailId), (((TextBox)(e.Item.FindControl("txtPriceInProject"))).Text).ToString(), (((TextBox)(e.Item.FindControl("txtmatnotes"))).Text).ToString(), ((RadioButtonList)(e.Item.FindControl("chkVerified"))).SelectedItem.Value, ((RadioButtonList)(e.Item.FindControl("chkPurchased"))).SelectedItem.Value, ((RadioButtonList)(e.Item.FindControl("chkReceived"))).SelectedItem.Value);
     grdEstimateMaterials.EditItemIndex = -1;
     grdEstimateMaterials.ShowFooter = true;
     DataSet dsGridMaterials = _wc.GetMaterialForEsitmation(Convert.ToInt32(ViewState["EstNum"].ToString()));
     this.PopulateDataGrid(dsGridMaterials, grdEstimateMaterials);
 }