Exemplo n.º 1
0
        public ActionResult EditRegister(Models.Customers customer)
        {
            Models.CompanyDatabase database = new Models.CompanyDatabase();

            if(ModelState.IsValid)
            {
                database.Entry(customer).State = EntityState.Modified;
                database.SaveChanges();
                return RedirectToAction("AdminRegister");
            }

            return View() ;
        }
Exemplo n.º 2
0
        public ActionResult EditOrders(Models.Orders order)
        {
            Models.CompanyDatabase database = new Models.CompanyDatabase();

            if (ModelState.IsValid)
            {
                database.Entry(order).State = EntityState.Modified;
                database.SaveChanges();
                return RedirectToAction("AdminOrders");
            }

            return View();
        }
Exemplo n.º 3
0
        public ActionResult EditFAQ(Models.FAQs faq)
        {
            Models.CompanyDatabase database = new Models.CompanyDatabase();

            if (ModelState.IsValid)
            {
                database.Entry(faq).State = EntityState.Modified;
                database.SaveChanges();
                return RedirectToAction("AdminFAQ");
            }

            return View();
        }
Exemplo n.º 4
0
        public ActionResult EditFeedbacks(Models.Feedbacks Feedback)
        {
            Models.CompanyDatabase database = new Models.CompanyDatabase();

            if (ModelState.IsValid)
            {
                database.Entry(Feedback).State = EntityState.Modified;
                database.SaveChanges();
                return RedirectToAction("AdminFeedBack");
            }

            return View();
        }
Exemplo n.º 5
0
        public ActionResult EditDistributors(Models.Distributors dist)
        {
            Models.CompanyDatabase database = new Models.CompanyDatabase();

            if (ModelState.IsValid)
            {
                database.Entry(dist).State = EntityState.Modified;
                database.SaveChanges();
                return RedirectToAction("AdminDistributors");
            }

            return View();
        }