public ActionResult LanTableExpressPartialDelete(string Id) { Id = Id.Replace("\"", ""); if (string.IsNullOrEmpty(Id)) { Id = "0"; } int id = Int32.Parse(Id); var model = new LanListPartialModel(); if (id > 0) { try { var d = dbl.Read(id); if (isAuthorized(d.Customer.Id) == AuthStates.NoAuth) { return(PartialView("NotAuthorizedPartical")); } dbl.Delete(d); model.customerid = d.Customer.Id; model.Lans = dbl.ReadAllWithFk(d.Customer.Id); } catch (Exception e) { ViewData["EditError"] = e.Message; } } return(PartialView("~/Views/Customers/_LanTableExpressPartial.cshtml", model)); }
public ActionResult LanTableExpressPartial(int Customerid) { if (isAuthorized(Customerid) == AuthStates.NoAuth) { return(PartialView("NotAuthorizedPartical")); } var model = new LanListPartialModel() { customerid = Customerid, Lans = dbl.ReadAllWithFk(Customerid) }; return(PartialView("~/Views/Customers/_LanTableExpressPartial.cshtml", model)); }