public ActionResult LeadsByProperty() { DateTime dCalcDate = DateTime.Now; LeadsByPropertyFilter model = new LeadsByPropertyFilter() { ShowReport = false, DateFrom = new DateTime(dCalcDate.Year, dCalcDate.Month, 1), DateTo = new DateTime(dCalcDate.Year, dCalcDate.Month, DateTime.DaysInMonth(dCalcDate.Year, dCalcDate.Month)) }; return(View(model)); }
public static List <LeadsByProperty> LeadsByProperty(LeadsByPropertyFilter filter) { using (JazMax.DataAccess.JazMaxDBProdContext db = new DataAccess.JazMaxDBProdContext()) { var sqlParams = new SqlParameter[] { new SqlParameter { ParameterName = "@LeadStatusId", Value = filter.LeadStatusId }, new SqlParameter { ParameterName = "@CoreBranchId", Value = filter.BranchId }, new SqlParameter { ParameterName = "@DateFrom", Value = filter.DateFrom }, new SqlParameter { ParameterName = "@DateTo", Value = filter.DateTo }, }; return(db.Database.SqlQuery <LeadsByProperty>($"SPLeadByProperty @LeadStatusId, @CoreBranchId, @DateFrom, @DateTo", sqlParams).ToList()); } }
public ActionResult LeadsByProperty(LeadsByPropertyFilter model) { model.ShowReport = true; model.Result = LeadReportCore.LeadsByProperty(model); return(View(model)); }