예제 #1
0
 public ActionResult Edit(LeadStatusViewModel leadStatus)
 {
     if (ModelState.IsValid)
     {
         var entity = Mapper.Map <LeadStatus>(leadStatus);
         leadStatusService.Update(entity);
         return(RedirectToAction("Index"));
     }
     return(View(leadStatus));
 }
예제 #2
0
        // GET: LeadStatus/Edit/5
        public ActionResult Edit(Guid?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            LeadStatusViewModel leadStatus = Mapper.Map <LeadStatusViewModel>(leadStatusService.Get

                                                                                  (id.Value));

            if (leadStatus == null)
            {
                return(HttpNotFound());
            }
            return(View(leadStatus));
        }