private void button1_Click(object sender, EventArgs e) { string name = txtName.Text; string address = txtAddress.Text; int zip = Int32.Parse(txtZip.Text); int priceRange = Int32.Parse(txtPriceRange.Text); Cafe cafe = new Cafe(name, zip, address, priceRange, 1); CafeCtr cafeCtr = new CafeCtr(); cafeCtr.Create(cafe); }
public Cafe Post(CafeRequestPP request) { var cafeCtr = new CafeCtr(); var cafeData = new Cafe { Name = request.Name, Address = request.Address, PriceRange = request.PriceRange, Rating = request.PriceRange, OpenTime = request.OpenTime, CloseTime = request.CloseTime, ZipID = request.ZipID, TypeID = request.TypeID }; cafeCtr.CreateCafe(cafeData); return cafeData; }
public Cafe Post(CreateCafeRequest request) { var cafeCtr = new CafeCtr(); var adminData = new Administrator { ID = request.AdminID }; var cafeData = new Cafe { Name = request.Name, Address = request.Address, PriceRange = request.PriceRange, Rating = request.PriceRange, OpenTime = request.OpenTime, CloseTime = request.CloseTime, ZipID = request.ZipID, TypeID = request.TypeID, Admin = adminData }; cafeCtr.CreateCafe(cafeData); return(cafeData); }
public void Delete(DeleteCafeRequest request) { var cafeCtr = new CafeCtr(); cafeCtr.Delete(request.ID); }
public List <Cafe> Get(GetAllCafesByZipRequest request) { var cafeCtr = new CafeCtr(); return(cafeCtr.GetAllCafesByZip(request.ZipID)); }
public List <Cafe> Get(GetAllCafesRequest request) { var cafeCtr = new CafeCtr(); return(cafeCtr.GetAllCafes()); }
public Cafe Get(GetCafeByIDRequest request) { var cafeCtr = new CafeCtr(); return(cafeCtr.GetCafeByID(request.ID)); }
public List <Cafe> Get(GetCafesByAdminIDRequest request) { var cafeCtr = new CafeCtr(); return(cafeCtr.GetCafesByAdminID(request.ID)); }
public CafeService() { _cafeCtr = new CafeCtr(); }