Ejemplo n.º 1
0
 //End DataGrid Functions
 protected void btnnew_Click(object sender, EventArgs e)
 {
     try
     {
         Boolean BoolIns = false;
         Whitfieldcore wIns = new Whitfieldcore();
         BoolIns = wIns.PopulateSubMaterials(Convert.ToInt32(ViewState["material_id"].ToString()), txtthickness.Text.Trim(), txtlength.Text.Trim(), txtweight.Text.Trim(), txtWidth.Text.Trim(), txtDescription.Text.Trim(), txtCost.Text.Trim(), Convert.ToInt32(ddlUOM.SelectedItem.Value), chkActive.SelectedItem.Value, txtManu.Text.Trim(), chkiFSC.SelectedItem.Value, txtMatCode.Text.Trim(), txtMemo.Text.Trim(), rdoDefault_Field.SelectedItem.Value);
         if (BoolIns)
         {
             lblMsg.Text = "Sub Material is added";
         }
         else
         {
             lblMsg.Text = "There is an error occured";
         }
     }
     catch (Exception exp)
     {
         Response.Write(exp.Message.ToString());
     }
     this.DisplayGrid(Convert.ToInt32(ViewState["material_id"].ToString()));
 }