Exemplo n.º 1
0
 private void ChangeType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ChangeType.SelectedIndex == 1)
     {
         List <string> typelist = RoomManger.GetRoomTypeList();
         SelectType.Items.Clear();
         foreach (string i in typelist)
         {
             SelectType.Items.Add(i);
         }
         SelectType.Visible = true;
     }
     else if (ChangeType.SelectedIndex == 4)
     {
         List <string> statuslist = RoomManger.GetRoomStatusList();
         SelectType.Items.Clear();
         foreach (string i in statuslist)
         {
             SelectType.Items.Add(i);
         }
         SelectType.Visible = true;
     }
     else
     {
         SelectType.Items.Clear();
         SelectType.Visible = false;
     }
 }
Exemplo n.º 2
0
        private void LoadStatus()
        {
            List <string> list = RoomManger.GetRoomStatusList();

            RoomStatus.Items.Clear();

            foreach (string i in list)
            {
                RoomStatus.Items.Add(i);
            }
        }
Exemplo n.º 3
0
        private void OperItem_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (OperItem.SelectedIndex != 2)
            {
                return;
            }
            NewRoomType.Items.Clear();
            NewRoomStatus.Items.Clear();
            if (OperItem.SelectedIndex == 2)
            {
                List <string> typelist   = RoomManger.GetRoomTypeList();
                List <string> statuslist = RoomManger.GetRoomStatusList();

                foreach (string i in typelist)
                {
                    NewRoomType.Items.Add(i);
                }

                foreach (string i in statuslist)
                {
                    NewRoomStatus.Items.Add(i);
                }
            }
        }