public ActionResult ReportMonth(ReportMonthViewModel model, FormCollection collection) { ViewBag.ReportList = "first active"; DateTime start = model.DateStart; model.DateStart = start.AddYears(-543); DateTime end = model.DateEnd; model.DateEnd = end.AddYears(-543); model.Report = new ReportMonth(); model.Report.Repairs = ReportManager.ReportRepairMonth(model.DateStart, model.DateEnd); model.Insurances = InsuranceManager.GetAll().OrderBy(m => m.sInsuranceName).ToList(); ViewBag.ReportHeader = String.Format("สรุปบริการประจำเดือน {0}", DateExtension.DateThaiFormat2(model.DateStart)); return View(model); }
//สรุปรายการซ่อมประจำเดือน public ActionResult ReportMonth() { ViewBag.ReportList = "first active"; ReportMonthViewModel model = new ReportMonthViewModel(); model.Report = new ReportMonth(); DateTime start = DateExtension.FirstDayOfMonthFromDateTime(DateTime.Now); model.DateStart = Convert.ToDateTime(start.AddYears(543).ToString("MM/dd/yyyy")); DateTime end = DateExtension.LastDayOfMonthFromDateTime(DateTime.Now); model.DateEnd = Convert.ToDateTime(end.AddYears(543).ToString("MM/dd/yyyy")); model.Report.Repairs = ReportManager.ReportRepairMonth(start, end); //model.Report.Claims = ReportManager.ReportClaim(start, end); model.Insurances = InsuranceManager.GetAll().OrderBy(m => m.sInsuranceName).ToList(); ViewBag.ReportHeader = String.Format("สรุปบริการประจำเดือน {0}", DateExtension.DateThaiFormat2(start)); return View(model); }
public ActionResult ReportServices(ReportServicesViewModel model, FormCollection collection) { ViewBag.ReportList = "first active"; DateTime start = model.DateStart; model.DateStart = start.AddYears(-543); DateTime end = model.DateEnd; model.DateEnd = end.AddYears(-543); model.Report = new ReportServices(); model.Report.Repairs = ReportManager.ReportRepair(model.DateStart, model.DateEnd); model.Report.Claims = ReportManager.ReportClaim(model.DateStart, model.DateEnd); model.Report.Staffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.SuperStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "หัวหน้าช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.QCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ฝ่ายตรวจสอบคุณภาพ").OrderBy(m => m.sStaffName).ToList(); ViewBag.ReportHeader = String.Format("รายรับ-รายจ่ายค่าบริการทั้งหมดประจำเดือน {0}", DateExtension.DateThaiFormat2(model.DateStart)); return View(model); }
//สรุปผลงานช่างประจำเดือน public ActionResult ReportServices() { ViewBag.ReportList = "first active"; ReportServicesViewModel model = new ReportServicesViewModel(); model.Report = new ReportServices(); DateTime start = DateExtension.FirstDayOfMonthFromDateTime(DateTime.Now); model.DateStart = Convert.ToDateTime(start.AddYears(543).ToString("MM/dd/yyyy")); DateTime end = DateExtension.LastDayOfMonthFromDateTime(DateTime.Now); model.DateEnd = Convert.ToDateTime(end.AddYears(543).ToString("MM/dd/yyyy")); model.Report.Repairs = ReportManager.ReportRepair(start, end); model.Report.Claims = ReportManager.ReportClaim(start, end); model.Report.Staffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.SuperStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "หัวหน้าช่าง").OrderBy(m => m.sStaffName).ToList(); model.Report.QCStaffs = StaffManager.GetAll().Where(m => m.StaffPosition.sDescription == "ฝ่ายตรวจสอบคุณภาพ").OrderBy(m => m.sStaffName).ToList(); ViewBag.ReportHeader = String.Format("รายรับ-รายจ่ายค่าบริการทั้งหมดประจำเดือน {0}", DateExtension.DateThaiFormat2(start)); return View(model); }