-
Notifications
You must be signed in to change notification settings - Fork 2
/
svC28.aspx.cs
executable file
·111 lines (97 loc) · 4.5 KB
/
svC28.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class svC28 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (Session["statsViewer"] == null) Response.Redirect("svLogin.aspx");
DataView dv = (DataView)(sdcph.Select(DataSourceSelectArguments.Empty));
DataView dvm = (DataView)(sdcmac.Select(DataSourceSelectArguments.Empty));
DataView dvl = (DataView)(sdloc.Select(DataSourceSelectArguments.Empty));
DataView dvf = (DataView)(sdcfin.Select(DataSourceSelectArguments.Empty));
DataView dvj = (DataView)(sdcjob.Select(DataSourceSelectArguments.Empty));
DataView dvc = (DataView)(sdccust.Select(DataSourceSelectArguments.Empty));
dvc.Sort = "custID";
dvj.Sort = "machineID";
dvl.Sort = "Id";
dvf.Sort = "jobID";
string ass = "c28";
for (int i = 0; i < dv.Table.Rows.Count; i++)
{
TableHeaderCell thc = new TableHeaderCell();
thc.Text = dv.Table.Rows[i]["phaseORDER"].ToString();
thc.BorderWidth = 1;
thr.Cells.Add(thc);
thc.Attributes.Add("data-toggle", "tooltip");
thc.Attributes.Add("data-placement", "top");
thc.Attributes.Add("title", dv.Table.Rows[i]["phaseNAME"].ToString());
}
for (int k = 0; k < dvm.Table.Rows.Count; k++)
{
if ((dvl.Find(dvm.Table.Rows[k]["locationID"])) >= 0)
{
TableRow tr = new TableRow();
tr.BackColor = System.Drawing.Color.Gray;
TableCell c1 = new TableCell();
LinkButton lb1 = new LinkButton();
lb1.Text = dvm.Table.Rows[k]["machineID"].ToString();
string ado = Convert.ToDateTime(dvm.Table.Rows[k]["machineAddDate"]).ToShortDateString();
lb1.PostBackUrl = "macDesc.aspx?mid=" + lb1.Text + "&ass=" + ass + "&ado=" + ado;
c1.Controls.Add(lb1);
c1.BorderWidth = 1;
tr.Cells.Add(c1);
c1.BackColor = System.Drawing.Color.White;
TableCell c2 = new TableCell();
LinkButton lb2 = new LinkButton();
c2.Controls.Add(lb2);
c2.BorderWidth = 1;
tr.Cells.Add(c2);
TableCell c3 = new TableCell();
LinkButton lb3 = new LinkButton();
c3.Controls.Add(lb3);
c3.BorderWidth = 1;
tr.Cells.Add(c3);
for (int i = 0; i < dv.Table.Rows.Count; i++)
{
TableCell tc = new TableHeaderCell();
tc.ID = dv.Table.Rows[i]["phaseORDER"].ToString();
tc.BorderWidth = 1;
tr.Cells.Add(tc);
tc.Width = 60;
}
int p = dvj.Find(dvm.Table.Rows[k]["machineID"]);
if (p >= 0)
{
tr.BackColor = System.Drawing.Color.White;
lb2.Text = dvj.Table.Rows[p]["jobID"].ToString();
lb2.PostBackUrl = "jobDesc.aspx?jid=" + lb2.Text;
lb3.Text = dvc.Table.Rows[dvc.Find(dvj.Table.Rows[p]["customerID"])]["custName"].ToString();
lb3.PostBackUrl = "custDesc.aspx?cid=" + dvc.Table.Rows[dvc.Find(dvj.Table.Rows[p]["customerID"])]["custID"].ToString();
foreach (TableCell tcc in tr.Cells)
{
//if (tcc.ID == dvj.Table.Rows[p]["currentPhaseID"].ToString())
// tcc.BackColor = System.Drawing.Color.Blue;
for (int i = 0; i < dvf.Table.Rows.Count; i++)
{
if ((dvf.Table.Rows[i]["jobID"].ToString() == dvj.Table.Rows[p]["jobID"].ToString()) && (tcc.ID == dvf.Table.Rows[i]["phaseID"].ToString()))
tcc.BackColor = System.Drawing.Color.Green;
}
}
}
tc28.Rows.Add(tr);
}
}
foreach (TableRow tr in tc28.Rows)
{
foreach (TableCell tc in tr.Cells)
{
tc.Attributes.CssStyle.Add("text-align","center");
}
}
}
}