public virtual ActionResult Index() { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; if (anmalan == null) { anmalan = new AnmalanModel(); PrismaServiceClient client = new PrismaServiceClient(); var request = new RequestMessageGetAllZones(); var response = client.GetAllZones(request); anmalan.ZoneList = new List <Zone>(response.Zones); anmalan.BuildingList = new List <Building>(); anmalan.FloorList = new List <Floor>(); anmalan.RoomList = new List <Room>(); var actions = client.GetAllWORequestActions(); anmalan.ActionList = new List <ActionEntity>(actions); client.Close(); anmalan.WRDescription = ""; } TempData["anmalan"] = anmalan; return(View(anmalan)); }
public ActionResult SelectedZoneChanged(AnmalanModel incomingAnmalan) { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; if (incomingAnmalan.SelectedZoneCode == null) { anmalan.BuildingList = new List <Building>(); anmalan.SelectedBuildingCode = null; } else { anmalan.SelectedZoneCode = incomingAnmalan.SelectedZoneCode; PrismaServiceClient client = new PrismaServiceClient(); var request = new RequestMessageGetBuildings(); request.ZoneCode = anmalan.SelectedZoneCode; var response = client.GetBuildings(request); anmalan.BuildingList = response.BuildingList; client.Close(); } anmalan.FloorList = new List <Floor>(); anmalan.SelectedFloorCode = null; anmalan.RoomList = new List <Room>(); anmalan.SelectedRoomCode = null; TempData["anmalan"] = anmalan; return(View("Index", anmalan)); }
public virtual ActionResult Index() { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; if (anmalan == null) { anmalan = new AnmalanModel(); PrismaServiceClient client = new PrismaServiceClient(); var request = new RequestMessageGetAllZones(); var response = client.GetAllZones(request); anmalan.ZoneList = new List<Zone>(response.Zones); anmalan.BuildingList = new List<Building>(); anmalan.FloorList = new List<Floor>(); anmalan.RoomList = new List<Room>(); var actions = client.GetAllWORequestActions(); anmalan.ActionList = new List<ActionEntity>(actions); client.Close(); anmalan.WRDescription = ""; } TempData["anmalan"] = anmalan; return View(anmalan); }
public virtual ActionResult WorkRequestView() { PrismaServiceClient client = new PrismaServiceClient(); RequestMessageGetWorkRequest request = new RequestMessageGetWorkRequest(); request.Username = Environment.UserName; var response = client.GetWorkRequest(request); WorkRequest[] arr = response.WorkRequestList; WorkRequestModel model = new WorkRequestModel(); model.WorkRequestList = new List <WorkRequest>(arr); return(View(model)); }
public ActionResult SelectedFloorChanged(AnmalanModel incomingAnmalan) { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; anmalan.SelectedFloorCode = incomingAnmalan.SelectedFloorCode; //Floor if (anmalan.SelectedFloorCode == null) { anmalan.SelectedFloorCode = null; anmalan.RoomList = new List <Room>(); anmalan.SelectedRoomCode = null; } else { PrismaServiceClient client = new PrismaServiceClient(); RequestMessageGetFloors requestMessageGetFloors = new RequestMessageGetFloors(); requestMessageGetFloors.BuildingCode = anmalan.SelectedBuildingCode; var responseMessageGetFloors = client.GetFloors(requestMessageGetFloors); var floors = responseMessageGetFloors.Floors; anmalan.FloorList = new List <Floor>(floors); anmalan.SelectedFloorCode = anmalan.SelectedFloorCode; //Room RequestMessageGetRooms requestMessageGetRooms = new RequestMessageGetRooms(); requestMessageGetRooms.BuildingCode = anmalan.SelectedBuildingCode; requestMessageGetRooms.FloorCode = anmalan.SelectedFloorCode; var responseMessageGetRooms = client.GetRooms(requestMessageGetRooms); var rooms = responseMessageGetRooms.Rooms; anmalan.RoomList = new List <Room>(rooms); anmalan.SelectedRoomCode = null; client.Close(); } TempData["anmalan"] = anmalan; return(View("Index", anmalan)); }
public ActionResult IndexSave(AnmalanModel incomingAnmalan) { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; PrismaServiceClient client = new PrismaServiceClient(); WorkRequest workRequest = new WorkRequest { BuildingCode = anmalan.SelectedBuildingCode, CreatedBy = Environment.UserName, Description = anmalan.WRDescription, FloorCode = anmalan.SelectedFloorCode, RoomCode = anmalan.SelectedRoomCode, WOActionCode = anmalan.SelectedActionCode, Telephone = anmalan.TelephoneNumber }; client.PutWorkRequest(workRequest); client.Close(); return(RedirectToAction("WorkRequestView")); }
public ActionResult IndexSave(AnmalanModel incomingAnmalan) { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; PrismaServiceClient client = new PrismaServiceClient(); WorkRequest workRequest = new WorkRequest { BuildingCode = anmalan.SelectedBuildingCode, CreatedBy = Environment.UserName, Description = anmalan.WRDescription, FloorCode = anmalan.SelectedFloorCode, RoomCode = anmalan.SelectedRoomCode, WOActionCode = anmalan.SelectedActionCode, Telephone = anmalan.TelephoneNumber }; client.PutWorkRequest(workRequest); client.Close(); return RedirectToAction("WorkRequestView"); }
public ActionResult SelectedBuildingChanged(AnmalanModel incomingAnmalan) { AnmalanModel anmalan = TempData["anmalan"] as AnmalanModel; if (incomingAnmalan.SelectedBuildingCode == null) { anmalan.SelectedBuildingCode = null; anmalan.FloorList = new List<Floor>(); anmalan.SelectedFloorCode = null; anmalan.RoomList = new List<Room>(); anmalan.SelectedRoomCode = null; } else { anmalan.SelectedBuildingCode = incomingAnmalan.SelectedBuildingCode; PrismaServiceClient client = new PrismaServiceClient(); RequestMessageGetFloors request = new RequestMessageGetFloors(); request.BuildingCode = anmalan.SelectedBuildingCode; //Floor var response = client.GetFloors(request); var floors = response.Floors; anmalan.FloorList = new List<Floor>(floors); anmalan.SelectedFloorCode = null; //Room anmalan.RoomList = new List<Room>(); anmalan.SelectedRoomCode = null; client.Close(); } TempData["anmalan"] = anmalan; return View("Index", anmalan); }
public virtual ActionResult WorkRequestView() { PrismaServiceClient client = new PrismaServiceClient(); RequestMessageGetWorkRequest request = new RequestMessageGetWorkRequest(); request.Username = Environment.UserName; var response = client.GetWorkRequest(request); WorkRequest[] arr = response.WorkRequestList; WorkRequestModel model = new WorkRequestModel(); model.WorkRequestList = new List<WorkRequest>(arr); return View(model); }