-
Notifications
You must be signed in to change notification settings - Fork 0
/
AddCOSOV.aspx.cs
74 lines (70 loc) · 2.5 KB
/
AddCOSOV.aspx.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Collections;
using System.Drawing;
using System.Configuration;
using System.Collections.Specialized;
public partial class AddCOSOV : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
NameValueCollection n = Request.QueryString;
if (!Page.IsPostBack)
{
// See if any query string exists
// See if any query string exists
if (n.HasKeys())
{
string k = n.GetKey(0);
string v = n.Get(0);
string k1 = n.GetKey(1);
string v1 = n.Get(1);
ViewState["EstNum"] = v;
ViewState["twc_project_number"] = Convert.ToInt32(v1);
}
BindItemNumber();
}
}
private void BindItemNumber()
{
project_invoice _pi = new project_invoice();
DataSet dsGrp = new DataSet();
dsGrp = _pi.GetHashtableData();
if (dsGrp.Tables[0].Rows.Count > 0)
{
ddlNo.DataSource = dsGrp;
ddlNo.DataValueField = "seq_value";
ddlNo.DataTextField = "seq_value";
ddlNo.DataBind();
}
}
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());
}
}
}