public string GetResultFileName(SearchFilters searchFilters) { Log.Instance.Warn("---Begin: GetResultFileName"); string fileName = ""; SiteBase site = null; try { if (ModelState.IsValid) { DbUpdates.PdfCreated(searchFilters, User.Identity.Name); return(fileName = new Rates().GetPdfLocation(site, searchFilters)); } else { Log.Instance.Warn("---ModelState not Valid: GetResultFileName"); return(""); } } catch (Exception ex) { Log.Instance.Error("--- " + ex.Message + "\n " + ex.InnerException + "\n" + ex.StackTrace); return(""); } }
public string InitiateDates(PricingModel searchFilters) { if (ModelState.IsValid) { DbUpdates.UpdatedRates(searchFilters, User.Identity.Name); PricingHelper pr = new PricingHelper(searchFilters, allClasses.Where(s => s.LocationId == searchFilters.Location && s.IntervalNum == searchFilters.IntervalNum && searchFilters.Classes.FirstOrDefault().Contains(s.ClassName)).ToArray()); return(pr.SetDates()); } else { return(""); } }
public string GeneratePrices(PricingModel searchFilters) { try { if (ModelState.IsValid) { DbUpdates.UpdatedRates(searchFilters, User.Identity.Name); PricingHelper pr = new PricingHelper(searchFilters, allClasses.Where(s => s.LocationId == searchFilters.Location && s.IntervalNum == searchFilters.IntervalNum && searchFilters.Classes.FirstOrDefault().Contains(s.ClassName)).ToArray()); return(pr.Excecute()); } else { return(""); } } catch (Exception ex) { Log.Instance.Error("--- " + ex.Message + "\n " + ex.InnerException + "\n" + ex.StackTrace); return(""); } }