private void SyncSelRowData()
        {
            try
            {
                //if (_isBinding) return;

                ClearData();

                if (dgvDept.DataSource == null)
                {
                    return;
                }
                if (dgvDept.SelectedRows.Count <= 0)
                {
                    return;
                }

                DataGridViewRow dvr = dgvDept.SelectedRows[0];


                string roomID = dvr.Cells["房间ID"].Value.ToString();
                txtRoomName.Tag = roomID;

                DataRow[] drs = (dgvDept.DataSource as DataTable).Select("房间ID='" + roomID + "'");

                if (drs.Length > 0)
                {
                    DepRoomData roomData = new DepRoomData();
                    roomData.BindRowData(drs[0]);

                    txtRoomName.Text = roomData.房间名称;

                    string    strRoomInfo = _DepRoomModel.GetRoomInfo(roomID);
                    JRoomInfo roomInfo    = JsonHelper.DeserializeObject <JRoomInfo>(strRoomInfo);
                    ShowDevice(roomID);

                    if (roomInfo != null)
                    {
                        txtTag.Text      = roomInfo.备注描述;
                        txtPosition.Text = roomInfo.位置;
                        txtLeader.Text   = roomInfo.负责人;
                    }
                }
                dgvDevice.Tag = roomID;
            }
            catch (Exception ex)
            {
                MsgBox.ShowException(ex, this);
            }
        }
        private DepRoomData GetSelectRoomData()
        {
            if (dgvDept.SelectedRows.Count <= 0)
            {
                return(null);
            }

            DataGridViewRow dvr = dgvDept.SelectedRows[0];

            string roomID = dvr.Cells["房间ID"].Value.ToString();

            DataRow[] drs = (dgvDept.DataSource as DataTable).Select("房间ID='" + roomID + "'");

            if (drs.Length > 0)
            {
                DepRoomData roomData = new DepRoomData();
                roomData.BindRowData(drs[0]);

                return(roomData);
            }

            return(null);
        }