public void grdCOSOV_DeleteCommand(object sender, DataGridCommandEventArgs e) { Whitfield_Project _wc = new Whitfield_Project(); String DetailId = ""; DetailId = grdCOSOV.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); project_invoice _dbClass = new project_invoice(); _dbClass.DeleteCOSOV(Convert.ToInt32(ViewState["twc_project_number"].ToString()), DetailId); _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString()); this.DisplayCOSOVGrid(); }
public void grdCOSOV_UpdateCommand(object sender, DataGridCommandEventArgs e) { Whitfield_Project _wc = new Whitfield_Project(); String SeqNo = grdCOSOV.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString(); project_invoice _pi = new project_invoice(); _pi.MaintainChangeOrderSOVRecords(ViewState["twc_project_number"].ToString(), SeqNo, ((TextBox)(e.Item.FindControl("txtco_number"))).Text, ((TextBox)(e.Item.FindControl("txtDescription"))).Text, ((TextBox)(e.Item.FindControl("txtsov_amount"))).Text, ((TextBox)(e.Item.FindControl("txtDate_Submited"))).Text, ((TextBox)(e.Item.FindControl("txtDate_Approved"))).Text, ((TextBox)(e.Item.FindControl("txtNotes"))).Text); grdCOSOV.EditItemIndex = -1; grdCOSOV.ShowFooter = true; _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString()); this.DisplayCOSOVGrid(); }
protected void btnnew_Click(object sender, EventArgs e) { try { Boolean BoolIns = false; project_invoice _pi = new project_invoice(); Whitfield_Project _wc = new Whitfield_Project(); BoolIns = _pi.MaintainChangeOrderSOVRecords(ViewState["twc_project_number"].ToString(), ddlNo.SelectedItem.Value, txtCONumber.Text.Trim(), txtDescription.Text.Trim(), txtAmt.Text.Trim(),txtSubmitDate.Text.Trim(),txtApprDate.Text.Trim(),txtComments.Text.Trim()); _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString()); if (BoolIns) { lblMsg.Text = "Schedule of Value is added"; } else { lblMsg.Text = "There is an error occured"; } Response.Write("<script language='javascript'>parent.location.replace('Whitfield_projectInvoice.aspx?EstNum=" + ViewState["EstNum"].ToString() + "&twc_project_number=" + ViewState["twc_project_number"].ToString() + "');</script>"); } catch (Exception exp) { Response.Write(exp.Message.ToString()); } }
protected void btnnew_Click(object sender, EventArgs e) { try { Boolean BoolIns = false; project_invoice _pi = new project_invoice(); Whitfield_Project _wc = new Whitfield_Project(); BoolIns = _pi.MaintainChangeOrderSOVRecords(ViewState["twc_project_number"].ToString(), ddlNo.SelectedItem.Value, txtCONumber.Text.Trim(), txtDescription.Text.Trim(), txtAmt.Text.Trim(), txtSubmitDate.Text.Trim(), txtApprDate.Text.Trim(), txtComments.Text.Trim()); _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString()); if (BoolIns) { lblMsg.Text = "Schedule of Value is added"; } else { lblMsg.Text = "There is an error occured"; } Response.Write("<script language='javascript'>parent.location.replace('Whitfield_projectInvoice.aspx?EstNum=" + ViewState["EstNum"].ToString() + "&twc_project_number=" + ViewState["twc_project_number"].ToString() + "');</script>"); } catch (Exception exp) { Response.Write(exp.Message.ToString()); } }
protected void btnsaveparameters_Click(object sender, EventArgs e) { Whitfield_Project wc = new Whitfield_Project(); try { Boolean IsUpdateSuccess = false; IsUpdateSuccess = wc.UpdateCostUpdates( ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString(), txtOrigContract.Text.Trim(), txtChangeOrder.Text.Trim() ); } catch (Exception ex) { Response.Write(ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { NameValueCollection n = Request.QueryString; if (!Page.IsPostBack) { // See if any query string exists Whitfield_Project _wc = new Whitfield_Project(); if (n.HasKeys()) { string k = n.GetKey(0); string v = n.Get(0); string k1 = n.GetKey(1); string v1 = n.Get(1); hdnEstNum.Value = v; hdntwcProjNumber.Value = v1; ViewState["EstNum"] = v; ViewState["twc_project_number"] = v1; _wc.UpdateCostUpdates(v, v1); BindPage(Convert.ToInt32(v), Convert.ToInt32(v1)); } } }