public bool AddFoodProgramDate(FoodProgramDateDTO FoodProgramDate) { try { DateTime d = DateTime.Now; var g = new foodProgramDate { customer_CID = FoodProgramDate.customer_CID, foodProgram_FPMID = FoodProgramDate.foodProgram_FPMID, date = d }; db.foodProgramDate.Add(g); db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool UpdateFoodProgramDate(FoodProgramDateDTO FoodProgramDate) { try { var foodDate = (from x in db.foodProgramDate where x.FPDID == FoodProgramDate.FPDID select x).SingleOrDefault(); foodDate.FPDID = FoodProgramDate.FPDID; foodDate.customer_CID = FoodProgramDate.customer_CID; foodDate.foodProgram_FPMID = FoodProgramDate.foodProgram_FPMID; foodDate.date = FoodProgramDate.date; db.SaveChanges(); return(true); } catch (Exception) { return(false); } }
public bool UpdateFoodProgramDate(FoodProgramDateDTO FoodProgramDate) { return(fpdq.UpdateFoodProgramDate(FoodProgramDate)); }
public bool AddFoodProgramDate(FoodProgramDateDTO FoodProgramDate) { return(fpdq.AddFoodProgramDate(FoodProgramDate)); }