public ActionResult ShowBills() { using (var context = new TownUtilityBillSystemEntities()) { var model = new BillModel(); var billsDB = context.BILL.ToList(); CustomizedMethod.Shuffle(billsDB); billsDB.RemoveRange(billCountToDisplay, billsDB.Count - billCountToDisplay); CreateBillModelFromBillList(context, model, billsDB); return(View(model)); } }
public ActionResult ShowRandomMeters() { using (var context = new TownUtilityBillSystemEntities()) { var model = new MeterModel(); var metersDB = context.METER.ToList(); model.TotalCount = metersDB.Count; CustomizedMethod.Shuffle(metersDB); metersDB.RemoveRange(meterCountToDisplay, metersDB.Count - meterCountToDisplay); CreateMeterModelFromMeterList(context, model, metersDB); var view = View("~/Views/Meter/ShowRandomMeters.cshtml", model); return(view); } }
public ActionResult FindCustomerBy() { using (var context = new TownUtilityBillSystemEntities()) { var model = new CustomerModel(); var customersDB = context.CUSTOMER.ToList(); model.TotalCount = customersDB.Count; CustomizedMethod.Shuffle(customersDB); customersDB.RemoveRange(customerCountToDisplay, customersDB.Count - customerCountToDisplay); CreateCustomerModelFromCustomerList(context, model, customersDB); var view = View("~/Views/Customer/FindCustomerBy.cshtml", model); return(view); } }