示例#1
0
        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()));
        }
示例#3
0
        public JsonResult Index()
        {
            var apiResult = TryExecute(() => _crmPotentialCategoryRepository.GetAll(), "Potential Categories Fetched sucessfully");

            return(Json(apiResult, JsonRequestBehavior.AllowGet));
        }