public int ApprovePendingRequestCaterer(string id, string cid) { int id1 = Convert.ToInt32(id); int cid1 = Convert.ToInt32(cid); CatererBooking b = db.CatererBookings.FirstOrDefault(x => x.b_id == id1 && x.companyID == cid1); b.status = 1; db.SaveChanges(); return(1); }
public int CompletedRequestCaterer(string id, string cid, string starCount, string text) { int id1 = Convert.ToInt32(id); int cid1 = Convert.ToInt32(cid); int starCount1 = Convert.ToInt32(starCount); CatererBooking b = db.CatererBookings.FirstOrDefault(x => x.b_id == id1 && x.companyID == cid1); b.starToCustomer = starCount1; if (text != null) { b.reviewToCustomer = text.Trim(); } b.status = 2; db.SaveChanges(); return(1); }
public int RegisterCatererBooking(CatererBooking b) { db.CatererBookings.Add(b); db.SaveChanges(); return(1); }