public JsonResult DeleteWorkshopUpdate(string idschedule) { 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.DeleteWorkshopSchedule(Convert.ToInt32(idschedule)); 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; } }