Пример #1
0
        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));
        }
Пример #2
0
        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);
        }