private void detail_Format(object sender, EventArgs e) { //if Unapproved if (lblStatus.Text == "*") { rptSubPSA rp = new rptSubPSA(); DataTable tbl = GINBussiness.GINModel.GetRemainingPAS(new Guid(textBox5.Text)); if (tbl.Rows.Count > 0) { Parameter p = new Parameter(); p.Key = "ColumnName"; p.Value = Convert.ToDecimal(tbl.Rows[0]["Weight"]) < 0 ? "OverDelivery" : "UnderDelivery"; rp.Parameters.Add(p); } rp.DataSource = tbl; subReportPSA.Report = rp; } //if Approved else { label3.Text = "Operation Controller:"; rptSubPSAApproval rp = new rptSubPSAApproval(); DataTable tbl2 = GINBussiness.GINModel.GetRemainingPASApproval(new Guid(textBox5.Text)); if (tbl2.Rows.Count > 0) { Parameter p = new Parameter(); p.Key = "ColumnName"; p.Value = Convert.ToDecimal(tbl2.Rows[0]["Weight"]) < 0 ? "OverDelivery" : "UnderDelivery"; rp.Parameters.Add(p); } rp.DataSource = tbl2; subReportPSA.Report = rp; //lblInventeryInspector.DataField = "InspectorName"; } }
private void detail_Format(object sender, EventArgs e) { //if Unapproved if (lblStatus.Text == "*") { rptSubPSA rp = new rptSubPSA(); rp.DataSource = GINBussiness.GINModel.GetRemainingPAS(new Guid(textBox5.Text)); subReportPSA.Report = rp; } //if Approved else { label3.Text = "Operation Controller:"; rptSubPSAApproval rp = new rptSubPSAApproval(); rp.DataSource = GINBussiness.GINModel.GetRemainingPASApproval(new Guid(textBox5.Text)); subReportPSA.Report = rp; //lblInventeryInspector.DataField = "InspectorName"; } }