Example #1
0
 protected void btnnew_Click(object sender, EventArgs e)
 {
     try
     {
         Boolean         BoolIns = false;
         project_invoice _pi     = new project_invoice();
         BoolIns = _pi.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(), txtSubmitDate.Text.Trim(), txtReceivedDate.Text.Trim(), txtApprDate.Text.Trim(), txtfabCost.Text.Trim(), txtInstCost.Text.Trim(), txtMatCost.Text.Trim(), txtBseContract.Text.Trim(), txtChangeOrder.Text.Trim(), txtDescription.Text.Trim(), ddlNo.SelectedItem.Value);
         if (BoolIns)
         {
             lblMsg.Text = "Invoice 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();
            BoolIns = _pi.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(),txtSubmitDate.Text.Trim(),txtReceivedDate.Text.Trim(),txtApprDate.Text.Trim(), txtfabCost.Text.Trim(),txtInstCost.Text.Trim(),txtMatCost.Text.Trim(),txtBseContract.Text.Trim(),txtChangeOrder.Text.Trim(), txtDescription.Text.Trim(),ddlNo.SelectedItem.Value);
            if (BoolIns)
            {
                lblMsg.Text = "Invoice 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());
        }
    }
Example #3
0
 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.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(), ddlNo.SelectedItem.Value, txtDescription.Text.Trim(), txtAmt.Text.Trim());
         if (BoolIns)
         {
             lblMsg.Text = "Schedule of Value is added";
         }
         else
         {
             lblMsg.Text = "There is an error occured";
         }
         _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString());
         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());
     }
 }
Example #4
0
 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.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(), ddlNo.SelectedItem.Value, txtDescription.Text.Trim(), txtAmt.Text.Trim());
         if (BoolIns)
         {
             lblMsg.Text = "Schedule of Value is added";
         }
         else
         {
             lblMsg.Text = "There is an error occured";
         }
         _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString());
         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());
     }
 }
 public void grdSOV_UpdateCommand(object sender, DataGridCommandEventArgs e)
 {
     Whitfield_Project _wc = new Whitfield_Project();
     String SeqNo = grdSOV.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString();
     project_invoice _pi = new project_invoice();
     _pi.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(), SeqNo, ((TextBox)(e.Item.FindControl("txtDescription"))).Text, ((TextBox)(e.Item.FindControl("txtsov_amount"))).Text);
     _wc.UpdateCostUpdates(ViewState["EstNum"].ToString(), ViewState["twc_project_number"].ToString());
     grdSOV.EditItemIndex = -1;
     grdSOV.ShowFooter = true;
     this.DisplaySOVGrid();
 }
 public void grdpl1_UpdateCommand(object sender, DataGridCommandEventArgs e)
 {
     String InvoiceID = grdpl1.DataKeys[Convert.ToInt32(e.Item.ItemIndex)].ToString();
     project_invoice _pi = new project_invoice();
     _pi.MaintainInvoiceRecords(ViewState["twc_project_number"].ToString(), ((TextBox)(e.Item.FindControl("txtDate_Submited"))).Text, ((TextBox)(e.Item.FindControl("txtDate_Received"))).Text, ((TextBox)(e.Item.FindControl("txtDate_Approved"))).Text, ((TextBox)(e.Item.FindControl("txtfab_lab_Cost"))).Text, ((TextBox)(e.Item.FindControl("txtIns_lab_Cost"))).Text, ((TextBox)(e.Item.FindControl("txtMaterial_cost"))).Text, ((TextBox)(e.Item.FindControl("txtBase_contract"))).Text, ((TextBox)(e.Item.FindControl("txtChange_order"))).Text, ((TextBox)(e.Item.FindControl("txtInvoice_comments"))).Text, InvoiceID);
     grdpl1.EditItemIndex = -1;
     grdpl1.ShowFooter = true;
     this.DisplayGrid();
 }