Ejemplo n.º 1
0
 public ActionResult DeleteCompany(int companyidedit, int listid)
 {
     try
     {
         if (companyidedit != 0)
         {
             context.DeleteContactCompanybyCompanyId(companyidedit);
             context.SaveChanges();
             TempData["Message"] = "Record Deleted";
         }
     }
     catch (Exception ex)
     {
         cm.ErrorExceptionLogingByService(ex.ToString(), "DeleteCompany" + ":" + new StackTrace().GetFrame(0).GetMethod().Name, "DeleteCompany", "NA", "NA", "NA", "WEB");
     }
     return(RedirectToAction("Index", new { @listid = listid, @lstname = "" }));
 }