示例#1
0
        public Result AddFoodDetails(FoodSchedule foodSchedule)
        {
            User   user   = getCurrentUser();
            Result result = new Result();

            if (user == null)
            {
                result.Message = "session timeout !!!";
            }
            else
            {
                foodSchedule.F_userid = user.u_id;
                foodSchedule.f_date   = DateTime.Now;
                result = CheckUserFoodDetails(foodSchedule);
                if (result.Message != "Exist")
                {
                    foodSchedule.F_FeedbackDate = DateTime.Now.AddDays(-1);
                    result = ifoodschedule.AddFoodSchedules(foodSchedule);
                }
            }

            return(result);
        }