Пример #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() ;
        }
Пример #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();
        }
Пример #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();
        }
Пример #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();
        }
Пример #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();
        }