public ActionResult FaultList(int type = 0) { ViewBag.Technician = MembershipTools.GetTechnician(); if (type == 0) { ViewBag.OperatorID = null; } else { ViewBag.OperatorID = System.Web.HttpContext.Current.User.Identity.GetUserId(); } var model = new FaultRepo().GetAll(); return(View(model)); }