Exemplo n.º 1
0
        public ActionResult FirewallTableExpressPartialDelete(string Id)
        {
            Id = Id.Replace("\"", "");
            if (string.IsNullOrEmpty(Id))
            {
                Id = "0";
            }
            int id    = Int32.Parse(Id);
            var model = new FirewallListPartialModel();

            if (id > 0)
            {
                try
                {
                    var d = dbf.Read(id);

                    dbf.Delete(d);
                    model.customerid = d.Customer.Id;
                    model.Firewalls  = dbf.ReadAllWithFk(d.Customer.Id);
                }
                catch (Exception e)
                {
                    ViewData["EditError"] = e.Message;
                }
            }
            return(PartialView("~/Views/Customers/_FirewallTableExpressPartial.cshtml", model));
        }
Exemplo n.º 2
0
        public ActionResult FirewallTableExpressPartial(int Customerid)
        {
            var model = new FirewallListPartialModel()
            {
                customerid = Customerid,
                Firewalls  = dbf.ReadAllWithFk(Customerid)
            };

            return(PartialView("~/Views/Customers/_FirewallTableExpressPartial.cshtml", model));
        }