Example #1
0
        public JsonResult ScheduleWorkshopAdd(string time, string dayint, string dayend, string idwo)
        {
            try
            {
                var    user   = (dynamic)null;
                string idUser = System.Web.HttpContext.Current.Session["SessionUser"] as String;
                if (idUser != null && idUser != "")
                {
                    Workshop us = new Workshop();
                    user = us.AddWorkshopSchedule(time, dayend, Convert.ToInt32(dayint), Convert.ToInt32(idwo));
                    if (user != null || user.Count > 1)
                    {
                        return(Json(user, JsonRequestBehavior.AllowGet));
                    }
                    else
                    {
                        return(Json(new { Success = false }));
                    }
                }
                else
                {
                    return(Json(new { Success = false }));
                }
            }
            catch (Exception ex)
            {
                return(Json(new { Success = false }));

                throw;
            }
        }