Ejemplo n.º 1
0
 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;
     }
 }
Ejemplo n.º 2
0
 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;
     }
 }
Ejemplo n.º 3
0
 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;
     }
 }
Ejemplo n.º 4
0
 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)));
 }