private void DayHeader(DateTime dtRpt, bool fAM, bool fPM, string KitchenLocation) { int cJobs = 0; int cServings = 0; string Sql = "Select Count(*) As Cnt, " + "(IsNull(Sum(NumMenServing), 0) + IsNull(Sum(NumWomenServing), 0) + IsNull(Sum(NumChildServing), 0)) As NumServings " + "From mcJobs Where JobDate = " + DB.PutDtTm(dtRpt) + " " + (fAM ? "And Datepart(hour, Coalesce(DepartureTime, MealTime, '1/1/1 00:00:01')) < 12 " : string.Empty) + (fPM ? "And Datepart(hour, Coalesce(DepartureTime, MealTime, '1/1/1 00:00:01')) >= 12 " : string.Empty) + "And CancelledDtTm Is Null"; try { DataTable dt = db.DataTable(Sql); DataRow dr = dt.Rows[0]; cJobs = DB.Int32(dr["Cnt"]); cServings = DB.Int32(dr["NumServings"]); } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } if (cJobs > 0) { if (fNewPage) { Response.Write( "<div style='page-break-before: always;'><img width='1' height='1' src='Images/Space.gif' alt='' /></div>"); } string Desc = KitchenLocation; Response.Write( //WebPage.Table("width='760' align='center'" + (fNewPage ? " style='page-break-before: always;" : "") + "'") + WebPage.Table("width='500' align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom'>\n" + WebPage.Tabs(3) + WebPage.Span(Desc, "RptNotice") + "\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Production Sheets", "center", "RptTitle") + WebPage.Tabs(4) + WebPage.Table("class='RptSubTitleBorder' style='padding-left: 2px; padding-right: 2px;'") + WebPage.Tabs(5) + "<tr><td class='RptSubTitle'>" + (fAM ? "AM " : string.Empty) + (fPM ? "PM " : string.Empty) + Fmt.DayOfWeek(dtRpt) + ", " + Fmt.Dt(dtRpt) + "</td></tr>\n" + WebPage.Tabs(3) + WebPage.TableEnd() + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom' align='right'>" + WebPage.Span(Fmt.Num(cJobs), "RptNotice") + " Jobs, " + WebPage.Span(Fmt.Num(cServings), "RptNotice") + " Servings</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd() + WebPage.SpaceTable(1, 40) ); fNewPage = true; } }
protected void Summary() { string SubTitle = Fmt.Dt(dtBeg) + " - " + Fmt.Dt(dtEnd); Response.Write( WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom'>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Jobs Entered", "center", "RptTitle") + WebPage.Tabs(3) + WebPage.Div(SubTitle, "center", "RptSubTitle") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom' align='right'>" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd() + WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(20, 30) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr><td colspan='25' align='right' id='Totals'></td></tr>\n" + WebPage.Tabs(1) + WebPage.SpaceTr(1, 10) + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td align='center'><b>Entered</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='center'><b>Time</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='center'><b>Date</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='center'><b>Depart Time</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='center'><b>Meal Time</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td><b>Customer</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td><b>Event Type</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td><b>Service Type</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right'><b>Servings</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='SmallPrint'><b>M</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='SmallPrint'><b>W</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='SmallPrint'><b>C</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='SmallPrint'><b>Job #</b></td>\n" + WebPage.Tabs(1) + "</tr>\n" ); }
protected void Report() { Response.Write("</head>\n<body class='RptBody'>\n"); int cServings = 0; int cJobs = 0; cDays = 0; dtPrevDay = DateTime.MinValue; string Sql = String.Format( "Select Count(*) As Cnt, " + "(IsNull(Sum(NumMenServing), 0) + IsNull(Sum(NumWomenServing), 0) + IsNull(Sum(NumChildServing), 0)) As NumServings " + "From mcJobs Where JobDate Between {0} And {1} " + "And CancelledDtTm Is Null And ProposalFlg <> 1", DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd)); try { DataTable dt = db.DataTable(Sql); DataRow dr = dt.Rows[0]; cJobs = DB.Int32(dr["Cnt"]); cServings = DB.Int32(dr["NumServings"]); } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } string Html = WebPage.Tabs(0) + WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='2' align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Job Calendar", "center", "RptTitle") + WebPage.Tabs(5) + WebPage.Div("Scheduled Jobs for the<br>" + sPeriod, "center", "RptSubTitle") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + WebPage.SpaceTr(1, 15) + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td><span class='RptInfo'>Click an event depature time to show or hide job details.</span></td>\n" + WebPage.Tabs(2) + "<td valign='bottom' align='right'>" + WebPage.Span(Fmt.Num(cServings), "RptNotice") + " Servings, " + WebPage.Span(Fmt.Num(cJobs), "RptNotice") + " Jobs, " + "<span id='cDays' class='RptNotice'>0</span> Days</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr><td colspan='2' valign='top'>\n" + "<br>\n"; Response.Write(Html); try { fNoDepartTime = false; scDays.Clear(); CalSched Cal = new CalSched(dtBeg, dtEnd); try { Cal.BegTimeStr("11:00am"); Cal.EndTimeStr("4:00pm"); Cal.TimeBlock = 5 * 60; Cal.DBConnection = db.Conn; Cal.SqlDataQuery( "Select Coalesce(DepartureTime, MealTime, JobDate) As DepartTime, DepartureTime, MealTime, Location, EventType, " + "ServiceType, NumMenServing, NumWomenServing, NumChildServing, Coalesce(cu.Name, c.Name) as Customer " + "From mcJobs j " + "Right Join Contacts c On j.ContactRno = c.ContactRno " + "Left Join Customers cu on c.CustomerRno = cu.CustomerRno " + "Where JobDate Between '{0}' And '{1}' And " + "CancelledDtTm Is Null And " + "IsNull(ProposalFlg, 0) = 0" + "Order By JobDate, DepartTime, MealTime", "DepartTime", "DepartTime"); Cal.FormatData = new CalSched.DataFormater(FormatJob); Cal.EndCal = new CalSched.CalEvent(EndCal); Cal.ShowTimeColumn = false; Cal.View(Response, this.CalPeriod); } catch (Exception Ex) { Err Err = new Err(Ex, Cal.SqlQuery); Response.Write(Err.Html()); } } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } Html = "<br>\n" + WebPage.Tabs(1) + "</td></tr>\n" + WebPage.Tabs(1) + "<tr><td colspan='2' align='center'>\n" + WebPage.Tabs(2) + "<input type=button value='Show Details' title='Click to show job details for all events.' onClick='ShowAll();' class='RptSmallBtn'> \n" + WebPage.Tabs(2) + "<input type=button value='Hide Details' title='Click to hide job details for all events.' onClick='HideAll();' class='RptSmallBtn'>\n" + WebPage.Tabs(1) + "</td></tr>\n" + WebPage.Tabs(0) + WebPage.TableEnd() + "<script lang='javascript'>\n" + "var EndJobNum = " + --iJobNum + ";\n" + "oSetStr('cDays', '" + Fmt.Num(cDays) + "');\n" + "</script>\n"; Response.Write(Html); }
protected bool ReportCrew(string CrewMember, bool fSingle, bool fMaster) { bool fDataFound = false; int cAssignments = 0; int cJobs = 0; cDays = 0; string Sql = String.Format( "Select Count(*) As Cnt " + "From mcJobCrew c Inner Join mcJobs j On c.JobRno = j.JobRno " + "Where JobDate Between {0} And {1} " + (fMaster ? "" : "And CrewMember = {2} ") + "And CancelledDtTm Is Null", DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd), DB.PutStr(CrewMember)); cAssignments = db.SqlNum(Sql); Sql = String.Format( "Select Distinct c.JobRno " + "From mcJobCrew c Inner Join mcJobs j On c.JobRno = j.JobRno " + "Where JobDate Between {0} And {1} " + (fMaster ? "" : "And CrewMember = {2} ") + "And CancelledDtTm Is Null", DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd), DB.PutStr(CrewMember)); try { DataTable dt = db.DataTable(Sql); cJobs = dt.Rows.Count; } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } if (cAssignments > 0 || fSingle) { fDataFound = true; string Html = WebPage.Tabs(0) + WebPage.Table("align='center'" + (fNewPage ? " style='page-break-before: always;'" : "")) + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='2' align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Crew Calendar", "center", "RptTitle") + WebPage.Tabs(5) + WebPage.Div("Job Assignments for <span class='RptSubTitle'>" + CrewMember + "</span><br>" + sPeriod, "center", "RptSubTitleSmall") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + WebPage.SpaceTr(1, 15) + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td><span class='RptInfo'>Click an event time to show or hide job details.</span></td>\n" + WebPage.Tabs(2) + "<td valign='bottom' align='right'>" + WebPage.Span(Fmt.Num(cAssignments), "RptNotice") + " Assignments, " + WebPage.Span(Fmt.Num(cJobs), "RptNotice") + " Jobs, " + "<span id='cDays" + ++iCal + "' class='RptNotice'>0</span> Days</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr><td colspan='2' valign='top'>\n" + "<br>\n"; Response.Write(Html); try { fNoReportTime = false; scDays.Clear(); CalSched Cal = new CalSched(dtBeg, dtEnd); try { Cal.BegTimeStr("11:00am"); Cal.EndTimeStr("4:00pm"); Cal.TimeBlock = 5 * 60; Cal.DBConnection = db.Conn; Cal.SqlDataQuery( "Select Coalesce(ReportTime, MealTime, JobDate) As ReportTm, ReportTime, MealTime, " + "CrewMember, CrewAssignment, Note, Customer, Location, EventType, " + "ServiceType " + "From mcJobCrew c Inner Join mcJobs j On c.JobRno = j.JobRno " + "Where JobDate Between '{0}' And '{1}' " + (fMaster ? "" : "And CrewMember = " + DB.PutStr(CrewMember) + " ") + "And CancelledDtTm Is Null " + "Order By JobDate, ReportTime, MealTime", "ReportTm", "ReportTm"); Cal.FormatData = new CalSched.DataFormater(FormatJob); Cal.EndCal = new CalSched.CalEvent(EndCal); Cal.ShowTimeColumn = false; Cal.View(Response, this.CalPeriod); } catch (Exception Ex) { Err Err = new Err(Ex, Cal.SqlQuery); Response.Write(Err.Html()); } } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } Html = WebPage.Tabs(1) + "</td></tr>\n" + WebPage.Tabs(1) + WebPage.SpaceTr(1, 20) + WebPage.Tabs(0) + WebPage.TableEnd() + "<script language='javascript'>oSetStr('cDays" + iCal + "', '" + Fmt.Num(cDays) + "');</script>\n"; Response.Write(Html); fNewPage = true; } return(fDataFound); }
protected void Report() { Response.Write("</head>\n<body class='RptBody'>\n"); int cJobs = 0; int cServings = 0; string Sql = String.Format( "Select Count(*) As Cnt, " + "(Sum(NumMenServing) + Sum(NumWomenServing) + Sum(NumChildServing)) As NumServings " + "From mcJobs Where JobDate Between {0} And {1} " + "And CancelledDtTm Is Null", DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd)); try { DataTable dt = db.DataTable(Sql); DataRow dr = dt.Rows[0]; cJobs = DB.Int32(dr["Cnt"]); cServings = DB.Int32(dr["NumServings"]); } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } string Html = WebPage.Table("align='center' width='100%'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom'>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Ingedients List", "center", "RptTitle") + WebPage.Tabs(5) + WebPage.Div(Fmt.Dt(dtBeg) + " - " + Fmt.Dt(dtEnd), "center", "RptSubTitle") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom' align='right'>" + WebPage.Span(Fmt.Num(cJobs), "RptNotice") + " Jobs, " + WebPage.Span(Fmt.Num(cServings), "RptNotice") + " Servings</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd(); Html += WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td></td>\n" + // category WebPage.Tabs(2) + WebPage.Space(15, 15) + // bullet WebPage.Tabs(2) + WebPage.Space(20, 1) + // space before JobDate WebPage.Tabs(2) + "<td></td>\n" + // JobDate WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + // JobTime WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + // customer WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + // # jobs WebPage.Tabs(2) + WebPage.Space(20, 1) + WebPage.Tabs(2) + "<td></td>\n" + // # servings WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + // per serving qty WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + // purchase qty WebPage.Tabs(2) + WebPage.Space(10, 1) + WebPage.Tabs(2) + "<td></td>\n" + // Vendor / Store Notes WebPage.Tabs(1) + "</tr>\n"; Html += WebPage.Tabs(1) + "<tr><td colspan='18' align='center'><span class='RptInfo'>Click an ingredient name to show or hide job details for that item.</span></td></tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='8'>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold'><b># Jobs</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold'><b># Servings</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold'><b>Per Serving Qty</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold'><b>Purchase Qty</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='center' class='RptHdrBold'><b>Vendor / Store Notes</b></td>\n" + WebPage.Tabs(1) + "</tr>\n"; Response.Write(Html); GetShoppingList(); Response.Write( WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + WebPage.Space(1, 30) + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='2'></td>\n" + WebPage.Tabs(2) + "<td colspan='14'>\n" + WebPage.Tabs(3) + "<input type=button value='Show Details' title='Click to show job details for all items.' onClick='ShowAll();' class='RptSmallBtn'>\n" + WebPage.Tabs(3) + "<input type=button value='Hide Details' title='Click to hide job details for all items.' onClick='HideAll();' class='RptSmallBtn'>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd() + "<script lang='javascript'>var iEndDtl = " + --iDtl + ";</script>\n" ); }
protected void Report() { Response.Write("</head>\n<body class='RptBody'>\n"); int cJobs = 0; int cServings = 0; string Sql = String.Format( "Select Count(*) As Cnt, " + "(Sum(IsNull(NumMenServing, 0)) + Sum(IsNull(NumWomenServing, 0)) + Sum(IsNull(NumChildServing, 0))) As NumServings " + "From mcJobs Where JobDate Between {0} And {1} And IsNull(ProposalFlg, 0) = 0 " + "And CancelledDtTm Is Null", DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd)); try { DataTable dt = db.DataTable(Sql); DataRow dr = dt.Rows[0]; cJobs = DB.Int32(dr["Cnt"]); cServings = DB.Int32(dr["NumServings"]); } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } string Html = WebPage.Table("align='center' width='100%'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom'>\n" + // WebPage.Tabs(2) + "<a href='javascript:ShowAll();'>Show Details</a> <a href='javascript:HideAll();'>Hide Details</a>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td align='center'>\n" + WebPage.Tabs(3) + WebPage.Div("Menu Servings", "center", "RptTitle") + WebPage.Tabs(5) + WebPage.Div(Fmt.Dt(dtBeg) + " - " + Fmt.Dt(dtEnd), "center", "RptSubTitle") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td width='30%' valign='bottom' align='right'>" + WebPage.Span(Fmt.Num(cJobs), "RptNotice") + " Jobs, " + WebPage.Span(Fmt.Num(cServings), "RptNotice") + " Servings</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd(); Html += WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td></td>\n" + // Category WebPage.Tabs(2) + WebPage.Space(15, 15) + // bullet WebPage.Tabs(2) + WebPage.Space(20, 1) + // space before JobDate WebPage.Tabs(2) + "<td></td>\n" + // JobDate WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + // JobTime WebPage.Tabs(2) + WebPage.Space(5, 1) + WebPage.Tabs(2) + "<td></td>\n" + // Customer WebPage.Tabs(2) + WebPage.Space(20, 1) + WebPage.Tabs(2) + "<td></td>\n" + // total servings WebPage.Tabs(2) + WebPage.Space(10, 1) + //WebPage.Tabs(2) + "<td></td>\n" + // men servings //WebPage.Tabs(2) + WebPage.Space(5, 1) + //WebPage.Tabs(2) + "<td></td>\n" + // women servings //WebPage.Tabs(2) + WebPage.Space(5, 1) + //WebPage.Tabs(2) + "<td></td>\n" + // child servings //WebPage.Tabs(2) + WebPage.Space(20, 1) + WebPage.Tabs(2) + "<td></td>\n" + // total jobs WebPage.Tabs(1) + "</tr>\n"; Html += WebPage.Tabs(1) + "<tr><td colspan='12'><span class='RptInfo'>Click an item name to show or hide job details for that item.</span></td></tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='7'>\n" + // WebPage.Tabs(3) + "<a href='javascript:ShowAll();'>Show</a> (Job Details) <a href='javascript:HideAll();'>Hide</a>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold' colspan='3'><b># Servings</b></td>\n" + WebPage.Tabs(2) + "<td></td>\n" + //WebPage.Tabs(2) + "<td align='right' class='RptHdr'>M</td>\n" + //WebPage.Tabs(2) + "<td></td>\n" + //WebPage.Tabs(2) + "<td align='right' class='RptHdr'>W</td>\n" + //WebPage.Tabs(2) + "<td></td>\n" + //WebPage.Tabs(2) + "<td align='right' class='RptHdr'>C</td>\n" + //WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right' class='RptHdrBold'><b># Jobs</b></td>\n" + WebPage.Tabs(1) + "</tr>\n"; Response.Write(Html); //FoodCategories FoodCat = new FoodCategories(); //for ( // string Category = FoodCat.FirstCategory(FoodCategories.Type.Hot); // Category != null; // Category = FoodCat.NextCategory()) //{ // MenuCategory(Category); //} //for ( // string Category = FoodCat.FirstCategory(FoodCategories.Type.Cold); // Category != null; // Category = FoodCat.NextCategory()) //{ // MenuCategory(Category); //} //MenuCategory("Meats"); //MenuCategory("Soup"); //MenuCategory("Pasta"); //MenuCategory("Sandwich"); //MenuCategory("Appetizers"); //MenuCategory("Sides"); //MenuCategory("Salads"); //MenuCategory("Bread"); //MenuCategory("Desserts"); //MenuCategory("Drink"); MenuCategory(""); Response.Write( WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + WebPage.Space(1, 30) + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td colspan='2'></td>\n" + WebPage.Tabs(2) + "<td colspan='12'>\n" + WebPage.Tabs(3) + "<input type=button value='Show Details' title='Click to show job details for all items.' onClick='ShowAll();' class='RptSmallBtn'>\n" + WebPage.Tabs(3) + "<input type=button value='Hide Details' title='Click to hide job details for all items.' onClick='HideAll();' class='RptSmallBtn'>\n" + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd() + "<script lang='javascript'>var iEndDtl = " + --iDtl + ";</script>\n" ); }
protected void Report() { string Html = "</head>\n<body class='RptBody'>\n" + WebPage.Table("align='center' width='100%'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td align='center'>\n" + WebPage.Tabs(3) + WebPage.Div((rdoPrivate.Checked ? "Private" : "Corporate") + " Jobs", "center", "RptTitle") + WebPage.Tabs(5) + WebPage.Div(Fmt.Dt(dtBeg) + " - " + Fmt.Dt(dtEnd), "center", "RptSubTitle") + WebPage.Tabs(2) + "</td>\n" + WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + WebPage.Space(1, 10) + WebPage.Tabs(1) + "</tr>\n" + WebPage.TableEnd(); Html += WebPage.Table("align='center'") + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td></td>\n" + // JobRno WebPage.Tabs(2) + WebPage.Space(15, 1) + WebPage.Tabs(2) + "<td></td>\n" + // JobDate WebPage.Tabs(2) + WebPage.Space(15, 1) + WebPage.Tabs(2) + "<td></td>\n" + // JobDesc WebPage.Tabs(2) + WebPage.Space(15, 1) + WebPage.Tabs(2) + "<td></td>\n" + // total servings WebPage.Tabs(1) + "</tr>\n" + WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<th>Job #</th>\n" + // JobRno WebPage.Tabs(2) + "<th></th>\n" + WebPage.Tabs(2) + "<th>Date</th>\n" + // JobDate WebPage.Tabs(2) + "<th></th>\n" + WebPage.Tabs(2) + "<th>Description</th>\n" + // JobDesc WebPage.Tabs(2) + "<th></th>\n" + WebPage.Tabs(2) + "<th>Servings</th>\n" + // total servings WebPage.Tabs(1) + "</tr>\n"; Response.Write(Html); string JobDesc = "(Case When Len(j.JobDesc) <> 0 Then j.JobDesc Else Coalesce(u.Name, c.Name, '') + ' - ' + j.EventType End)"; string Sql = String.Format( "Select j.JobRno, JobDate, " + JobDesc + " as JobDesc, " + "(IsNull(j.NumMenServing, 0) + IsNull(j.NumWomenServing, 0) + IsNull(j.NumChildServing, 0)) As NumServings " + "From mcJobs j " + "Left Join Contacts c on j.ContactRno = c.ContactRno " + "Left Join Customers u on c.CustomerRno = u.CustomerRno " + "Where j.JobType = {0} And " + "j.JobDate Between {1} And {2} And " + "IsNull(j.ProposalFlg, 0) = 0 And " + "j.CancelledDtTm Is Null " + "Order By j.JobDate, j.JobRno, " + JobDesc, DB.Put(rdoPrivate.Checked ? "Private" : "Corporate"), DB.PutDtTm(dtBeg), DB.PutDtTm(dtEnd)); try { DataTable dt = db.DataTable(Sql); foreach (DataRow dr in dt.Rows) { int JobRno = DB.Int32(dr["JobRno"]); string JobDate = Fmt.Dt(DB.DtTm(dr["JobDate"])); string Desc = DB.Str(dr["JobDesc"]); string Servings = Fmt.Num(DB.Int32(dr["NumServings"])); Html = WebPage.Tabs(1) + "<tr>\n" + WebPage.Tabs(2) + "<td align='right'>" + JobRno + "</td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td>" + JobDate + "</td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td>" + Desc + "</td>\n" + WebPage.Tabs(2) + "<td></td>\n" + WebPage.Tabs(2) + "<td align='right'>" + Servings + "</td>\n" + WebPage.Tabs(1) + "</tr>\n"; Response.Write(Html); } } catch (Exception Ex) { Err Err = new Err(Ex, Sql); Response.Write(Err.Html()); } Html = WebPage.TableEnd(); Response.Write(Html); Response.End(); }