/// <summary> /// /// </summary> /// <param name="id">AcquisitionId</param> /// <returns></returns> public ActionResult ByStateAndGender(int id) { var vm = new StatisticViewModel(); if (id != 0) { vm.Acquisition = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(id); vm.ListOfState.AddRange(ObjectBuilder.GetObject<IReferencePersistence>("ReferencePersistence").GetStates("MYS")); } return View(vm); }
public ActionResult Index() { var vm = new StatisticViewModel(); var did = 0; if (Session["SelectedAcquisition"] == null) return RedirectToAction("Intakes", "Admin"); if (Session["SelectedAcquisition"] != null) { var acqid = Session["SelectedAcquisition"].ToString(); if (!string.IsNullOrWhiteSpace(acqid)) { int.TryParse(acqid, out did); if (did == 0) return RedirectToAction("Intakes", "Admin"); var acq = ObjectBuilder.GetObject<IAcquisitionPersistence>("AcquisitionPersistence").GetAcquisition(did); if (null != acq) { vm.Acquisition = acq; } } } return View(vm); }