Example #1
0
 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);
     }
 }
Example #2
0
        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);
            }
        }
Example #3
0
 public bool UpdateFoodProgramDate(FoodProgramDateDTO FoodProgramDate)
 {
     return(fpdq.UpdateFoodProgramDate(FoodProgramDate));
 }
Example #4
0
 public bool AddFoodProgramDate(FoodProgramDateDTO FoodProgramDate)
 {
     return(fpdq.AddFoodProgramDate(FoodProgramDate));
 }