public ActionResult GetList_ServiceType() { var Cookie = Request.Cookies["ServiPlus"]; var Token = Cookie.Value; string[] nums = Token.Split('=').ToArray(); string User = nums[1]; var user = FacadeUsers.GetUserByToken(User); if (user.ProfileID == 7) { var ls = FacadeGuaranty.GetAll().Select(p => new SelectListItem() { Text = p.GuarantyID + " - " + p.Guaranty1, Value = p.PK_GuarantyID.ToString(), }).Where(p => p.Text != "0070 - SERVICIO DE CARGO" && p.Text != "0080 - DEMOSTRACIÓN/CONEXIÓN-CARGO" && p.Text != "0090 - INSTALACIÓN DE PRODUCTO-CARGO").ToList <SelectListItem>(); return(Json(ls, JsonRequestBehavior.AllowGet)); } else { var ls = FacadeGuaranty.GetAll().Select(p => new SelectListItem() { Text = p.GuarantyID + " - " + p.Guaranty1, Value = p.PK_GuarantyID.ToString() }).ToList <SelectListItem>(); return(Json(ls, JsonRequestBehavior.AllowGet)); } }
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()); }