Beispiel #1
0
 private void Sava_Edit(object sender, RoutedEventArgs e)
 {
     if (this.roomName.Text.Equals(""))
     {
         MessageBox.Show("请输入机房名称!");
         return;
     }
     RoomBean bean = new RoomBean();
     RoomClass rc=new RoomClass();
     bean.RoomName = this.roomName.Text;
     bean.Floor = this.floor.Text;
     bean.Purpose = this.purpose.Text;
     bean.Belongs = this.belongs.Text;
     bean.Id = (int)this.roomId.Content;
     int state=rc.saveEditRoom(bean);
     if (state == BaseRequest.SUCCESS)
     {
         MessageBox.Show("操作成功!");
         this.edit_room.Visibility = Visibility.Hidden;
         RoomManagerBean.AddRoom.page.ShowPages(RoomManagerBean.AddRoom.roomDate, rc.queryRoomsList(), BaseRequest.PAGE_SIZE);
     }
 }
Beispiel #2
0
        private void Sava_Edit(object sender, RoutedEventArgs e)
        {
            if (this.roomName.Text.Equals(""))
            {
                MessageBox.Show("请输入机房名称!");
                return;
            }
            RoomBean  bean = new RoomBean();
            RoomClass rc   = new RoomClass();

            bean.RoomName = this.roomName.Text;
            bean.Floor    = this.floor.Text;
            bean.Purpose  = this.purpose.Text;
            bean.Belongs  = this.belongs.Text;
            bean.Id       = (int)this.roomId.Content;
            int state = rc.saveEditRoom(bean);

            if (state == BaseRequest.SUCCESS)
            {
                MessageBox.Show("操作成功!");
                this.edit_room.Visibility = Visibility.Hidden;
                RoomManagerBean.AddRoom.page.ShowPages(RoomManagerBean.AddRoom.roomDate, rc.queryRoomsList(), BaseRequest.PAGE_SIZE);
            }
        }