コード例 #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);
     }
 }
コード例 #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);
            }
        }
コード例 #3
0
 public bool UpdateFoodProgramDate(FoodProgramDateDTO FoodProgramDate)
 {
     return(fpdq.UpdateFoodProgramDate(FoodProgramDate));
 }
コード例 #4
0
 public bool AddFoodProgramDate(FoodProgramDateDTO FoodProgramDate)
 {
     return(fpdq.AddFoodProgramDate(FoodProgramDate));
 }