Ejemplo n.º 1
0
        public ActionResult CreateTiming(BOAvailableTiming model)
        {
            model.VipId = VIPID;
            blavailable.AddAvailableTiming(model);

            return(RedirectToAction("VIP", new { id = VIPID }));
        }
Ejemplo n.º 2
0
        public JsonResult Add(BOAvailableTiming model)
        {
            model.VipId = VIPID;
            int date    = DateTime.Compare(DateTime.Now, Convert.ToDateTime(model.Date)); //now < myone ==>-1
            int results = DateTime.Compare(Convert.ToDateTime(model.EndTime), Convert.ToDateTime(model.StartTime));

            if (date <= 0 && results > 0)
            {
                int result = available.AddAvailableTiming(model);
                return(Json(result, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(-1, JsonRequestBehavior.AllowGet));
            }
        }