public ActionResult Edit(int id) { var cRMPotential = _crmPotentialRepository.Get(id); ViewBag.CategoryId = new SelectList(_crmPotentialCategoryRepository.GetAll(), "Id", "Title", cRMPotential.CategoryId); ViewBag.AssignedToUserId = new SelectList(_userRepository.GetAll("Person"), "Id", "Person.Name", cRMPotential.AssignedToUserId); ViewBag.ContactId = new SelectList(_crmContactRepository.GetAll("Person"), "Id", "Person.Name", cRMPotential.ContactId); ViewBag.SalesStageId = new SelectList(_crmSalesStageRepository.GetAll(), "Id", "Name", cRMPotential.SalesStageId); return(View(cRMPotential)); }
public ActionResult Index() { var crmPotentialCategories = _crmPotentialCategoryRepository.GetAll("CreatedByUser,UpdatedByUser"); return(View(crmPotentialCategories.OrderByDescending(c => c.CreatedOn).ToList())); }
public JsonResult Index() { var apiResult = TryExecute(() => _crmPotentialCategoryRepository.GetAll(), "Potential Categories Fetched sucessfully"); return(Json(apiResult, JsonRequestBehavior.AllowGet)); }