public ActionResult GetList_Prioritys() { var ls = FacadeSchedule.GetAll().Select(p => new SelectListItem() { Text = p.ScheduleStart + " - " + p.ScheduleEnd, Value = p.PK_ScheduleID.ToString() }).ToList <SelectListItem>(); return(Json(ls, JsonRequestBehavior.AllowGet)); }
public JsonResult savePriority(string modelo) { ModelViewPriority model = new JavaScriptSerializer().Deserialize <ModelViewPriority>(modelo); if (model.ScheduleID == 0) { //if (!FachadaSeguridad.Autorizado(HttpContext.User.Identity.Name, "/Usuario/Index", AuditoriaAccion.Agregar)) // return Json("Unauthorized"); //FacadeUsers.Insert(model); } else { //if (!FachadaSeguridad.Autorizado(HttpContext.User.Identity.Name, "/Usuario/Index", AuditoriaAccion.Actualizar)) // return Json("Unauthorized"); FacadeSchedule.Update(model); } return(Json("{ Result: 'Success'}")); }
public ActionResult Index() { ViewBag.lstModules = FacadeModuleService.GetAll().Select(p => new SelectListItem() { Text = p.ID + " - " + p.Base, Value = p.ModuleID.ToString() }).ToList <SelectListItem>(); ViewBag.lstPrioritys = FacadeSchedule.GetAll().Select(p => new SelectListItem() { Text = p.ScheduleStart + " - " + p.ScheduleEnd, Value = p.PK_ScheduleID.ToString() }).ToList <SelectListItem>(); ViewBag.lstGuaranty = FacadeGuaranty.GetAll().Select(p => new SelectListItem() { Text = p.GuarantyID + " - " + p.Guaranty1, Value = p.PK_GuarantyID.ToString() }).ToList <SelectListItem>(); ViewBag.lstStatusOrder = FacadeStatusCauseOrder.GetAll().Select(p => new SelectListItem() { Text = p.StatusOrder1, Value = p.PK_StatusOrderID.ToString() }).ToList <SelectListItem>(); return(View()); }
public ActionResult GetListAll([DataSourceRequest] DataSourceRequest request) { var ls = FacadeSchedule.GetListAll(); return(Json(ls.ToDataSourceResult(request), JsonRequestBehavior.DenyGet)); }