Esempio n. 1
0
        public ActionResult Create(Buildings DataBuilding)
        {
            try
            {
                using (MaterialsEntities MEDB = new MaterialsEntities())
                {
                    MEDB.InsertBuildings(DataBuilding.Building, DataBuilding.Available);
                    MEDB.SaveChanges();
                }

                return(RedirectToAction("/Home/Index"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(Customers DataCustomers)
        {
            try
            {
                using (MaterialsEntities MEDB = new MaterialsEntities())
                {
                    MEDB.InsertCustomers(DataCustomers.Customer, DataCustomers.Prefix,
                                         DataCustomers.FKBuilding, DataCustomers.Available);
                    MEDB.SaveChanges();
                }

                return(RedirectToAction("/Home/Index"));
            }
            catch
            {
                return(View());
            }
        }
        public ActionResult Create(PartNumbers DataPartNumbers)
        {
            try
            {
                using (MaterialsEntities MEDB = new MaterialsEntities())
                {
                    MEDB.InsertPartNumber(DataPartNumbers.PartNumber, DataPartNumbers.FKCustomer,
                                          DataPartNumbers.Available);
                    MEDB.SaveChanges();
                }

                return(RedirectToAction("/Home/Index"));
            }
            catch
            {
                return(View());
            }
        }