protected void Page_Load(object sender, EventArgs e) { DataView dv = (DataView)DetailsSelect.Select(DataSourceSelectArguments.Empty); if (dv == null) { Response.Redirect("/404.aspx"); } else { int a = 0; string b = "", c = "", d = "", h = ""; Double f = 0; DateTime g; a = (int)dv.Table.Rows[0][0]; //rno b = (string)dv.Table.Rows[0][1]; //rxno c = (string)dv.Table.Rows[0][2]; //payortb d = (string)dv.Table.Rows[0][3]; //partic f = (Double)dv.Table.Rows[0][4]; //amnt h = (string)dv.Table.Rows[0][5]; //recby g = (DateTime)dv.Table.Rows[0][6]; //ddate rno.Text = a.ToString(); rxno.Text = b; payortb.Text = c; partic.Text = d; amnt.Text = f.ToString("n2"); recby.Text = h; ddate.Text = g.ToLongDateString(); } }
protected void Page_Load(object sender, EventArgs e) { DataView dv1 = (DataView)ExpensesSelect.Select(DataSourceSelectArguments.Empty); if (dv1.Table.Rows[0][0] is DBNull) { oe = 0; } else { oe = (Double)dv1.Table.Rows[0][0]; } if (dv1.Table.Rows[0][1] is DBNull) { pb = 0; } else { pb = (Double)dv1.Table.Rows[0][1]; } vr = (Double)dv1.Table.Rows[0][2]; DataView dv2 = (DataView)Amenity.Select(DataSourceSelectArguments.Empty); DataView dv3 = (DataView)Facility.Select(DataSourceSelectArguments.Empty); DataView dv4 = (DataView)Misc.Select(DataSourceSelectArguments.Empty); if (dv2.Table.Rows[0][0] is DBNull) { amntyex = 0; } else { amntyex = (Double)dv2.Table.Rows[0][0]; } if (dv3.Table.Rows[0][0] is DBNull) { facex = 0; } else { facex = (Double)dv3.Table.Rows[0][0]; } if (dv4.Table.Rows[0][0] is DBNull) { miscex = 0; } else { miscex = (Double)dv4.Table.Rows[0][0]; } Label6.Text = vr.ToString("n2"); Label7.Text = amntyex.ToString("n2"); Label8.Text = facex.ToString("n2"); Label9.Text = miscex.ToString("n2"); Label10.Text = oe.ToString("n2"); Label11.Text = pb.ToString("n2"); total = oe + pb + vr + amntyex + facex + miscex; Label12.Text = total.ToString("n2"); Label2.Text = DateTime.Now.ToLongDateString(); DataView dv5 = (DataView)DetailsSelect.Select(DataSourceSelectArguments.Empty); string vn, en, cn, cc; DateTime ddate; TimeSpan st, et; vn = (string)dv5.Table.Rows[0][0]; ddate = (DateTime)dv5.Table.Rows[0][1]; st = (TimeSpan)dv5.Table.Rows[0][2]; et = (TimeSpan)dv5.Table.Rows[0][3]; en = (string)dv5.Table.Rows[0][4]; cn = (string)dv5.Table.Rows[0][5]; cc = (string)dv5.Table.Rows[0][6]; Venue.Text = vn; EventDate.Text = ddate.ToLongDateString(); StartTime.Text = ConvertMode(st.ToString()); EndTime.Text = ConvertMode(et.ToString()); EventName.Text = en; Label3.Text = cn; Label4.Text = cc; }
protected void Page_Load(object sender, EventArgs e) { DataView dvx = (DataView)sumamnty.Select(DataSourceSelectArguments.Empty); Double tl = (Double)dvx.Table.Rows[0][0]; Label7.Text = tl.ToString("n2"); DataView dvy = (DataView)sumfac.Select(DataSourceSelectArguments.Empty); Double tl1 = (Double)dvy.Table.Rows[0][0]; Label8.Text = tl1.ToString("n2"); DataView dvz = (DataView)summisc.Select(DataSourceSelectArguments.Empty); Double tl2 = (Double)dvz.Table.Rows[0][0]; Label9.Text = tl2.ToString("n2"); DataView dmg = (DataView)dmgSum.Select(DataSourceSelectArguments.Empty); Double dgs = (Double)dmg.Table.Rows[0][0]; Label10.Text = dgs.ToString("n2"); DataView acum = (DataView)Accum.Select(DataSourceSelectArguments.Empty); Double w = (Double)acum.Table.Rows[0][0]; Label6.Text = w.ToString("n2"); x = Convert.ToDouble(Label7.Text); y = Convert.ToDouble(Label8.Text); z = Convert.ToDouble(Label9.Text); total = x + y + z + w + dgs; Label12.Text = total.ToString("n2"); Label2.Text = DateTime.Now.ToLongDateString(); DataView PBD = (DataView)PB.Select(DataSourceSelectArguments.Empty); Double P = (Double)PBD.Table.Rows[0][0]; P = P - total; if (P >= 0) { Label14.Text = "Refundable Amount "; Label13.Text = P.ToString("n2"); } else { P = Math.Abs(P); Label13.Text = P.ToString("n2"); Label14.Text = "Remaining Balance"; } DataView dv5 = (DataView)DetailsSelect.Select(DataSourceSelectArguments.Empty); string vn, en, cn, cc; DateTime ddate; TimeSpan st, et; vn = (string)dv5.Table.Rows[0][0]; ddate = (DateTime)dv5.Table.Rows[0][1]; st = (TimeSpan)dv5.Table.Rows[0][2]; et = (TimeSpan)dv5.Table.Rows[0][3]; en = (string)dv5.Table.Rows[0][4]; cn = (string)dv5.Table.Rows[0][5]; cc = (string)dv5.Table.Rows[0][6]; Venue.Text = vn; EventDate.Text = ddate.ToLongDateString(); StartTime.Text = ConvertMode(st.ToString()); EndTime.Text = ConvertMode(et.ToString()); EventName.Text = en; Label3.Text = cn; Label4.Text = cc; }