public ActionResult ODZCaseCreat() { try { ViewBag.ServiceId = new SelectList(CmsDAL.GetService(), "ServiceId", "ServiceId"); Case issue = new Case(); return(View(issue)); } catch (CmsExceptions ex) { logger.Error(ex.ToString()); throw ex; } }
public PartialViewResult Edit(int caseId) { try { using (CMSDBContext context = new CMSDBContext()) { ViewBag.ServiceId = new SelectList(CmsDAL.GetService(), "ServiceId", "ServiceId"); var user = context.Cases.Where(a => a.CaseId == caseId).FirstOrDefault(); return(PartialView(user)); } } catch (CmsExceptions ex) { logger.Error(ex.ToString()); throw ex; } }
public ActionResult Edit(Case issue) { try { ViewBag.ServiceId = new SelectList(CmsDAL.GetService(), "ServiceId", "ServiceId"); using (CMSDBContext context = new CMSDBContext()) { SendEmail(issue); context.Cases.AddOrUpdate(issue); context.SaveChanges(); } return(View(issue)); } catch (CmsExceptions ex) { logger.Error(ex.ToString()); throw ex; } }
public ActionResult ODZCaseCreat(Case issue) { try { ViewBag.ServiceId = new SelectList(CmsDAL.GetService(), "ServiceId", "ServiceId"); using (CMSDBContext context = new CMSDBContext()) { SendEmail(issue); InsertToLDZCase(issue); context.Cases.AddOrUpdate(issue); context.SaveChanges(); } } catch (CmsExceptions ex) { logger.Error(ex.ToString()); throw ex; } return(RedirectToAction(nameof(ODZHome))); }