public ActionResult Index() { StaffRepository staff = new StaffRepository(); SuppliersRepository Supplier = new SuppliersRepository(); staff.CreateStaff(); staff.InsertStaff_StoredProcedure(); staff.UpdateStaff(); staff.GetStaff(); //staff.DeleteWardStaffAllocation(); //staff.DeleteStaff(); staff.GetStaffView(); Supplier.CreateSupplier(); Supplier.UpdateSupplier(); Supplier.GetSupplier(); //Supplier.DeleteSupplier(); return(View()); }
/// <summary> /// Updates a Supplier /// Level: Logic /// </summary> /// <param name="ID">The Supplier ID</param> /// <param name="Supplier">The Supplier Name</param> /// <param name="Email">The Email</param> /// <param name="Postcode">The Postcode</param> /// <param name="StreetAddress">The Street Address</param> /// <param name="Town">The Town</param> /// <param name="Country">The Country</param> public void UpdateSupplier(int ID, string Supplier, string Email, string Postcode, string StreetAddress, string Town, string Country) { try { SuppliersRepository myRepository = new SuppliersRepository(); SuppliersView mySupplier = new SuppliersView(); mySupplier.Id = ID; mySupplier.Supplier = Supplier; mySupplier.Email = Email; mySupplier.Postcode = Postcode; mySupplier.StreetAddress = StreetAddress; mySupplier.Town = Town; mySupplier.Country = Country; myRepository.UpdateSupplier(mySupplier); } catch (Exception Exception) { throw Exception; } }