コード例 #1
0
ファイル: frmRoomManage.cs プロジェクト: wollfman/ToolsManage
        private void sbtnAddUser_Click(object sender, EventArgs e)
        {
            frmRoomEdit frm = new frmRoomEdit(null);

            frm.Tag = "添加";
            frm.ShowDialog(this);
            frm.Dispose();
            LoadAndUpShow();
        }
コード例 #2
0
ファイル: frmRoomManage.cs プロジェクト: wollfman/ToolsManage
 private void sbtnAlter_Click(object sender, EventArgs e)
 {
     int[] rows = gridView1.GetSelectedRows(); //选中多行
     if (rows.Length > 0)
     {
         int        ID       = Convert.ToInt16(gridView1.GetRowCellDisplayText(rows[0], "ID"));
         TbRoominfo roomInfo = listRoomInfo.Find(p => p.ID == ID);
         if (roomInfo != null)
         {
             frmRoomEdit frm = new frmRoomEdit(roomInfo);
             frm.Tag = "修改";
             frm.ShowDialog(this);
             frm.Dispose();
             LoadAndUpShow();
         }
         //frm.Tag = "修改";
         //frm.strID = gridView1.GetRowCellDisplayText(rows[0], "ID").ToString();
         //frm.strName = gridView1.GetRowCellDisplayText(rows[0], "RoomName").ToString();
         //frm.strWsd1 = gridView1.GetRowCellDisplayText(rows[0], "WsdAddr1").ToString();
         //frm.strFire1 = gridView1.GetRowCellDisplayText(rows[0], "FireAddr1").ToString();
         //frm.strRelay = gridView1.GetRowCellDisplayText(rows[0], "RelayAddr").ToString();
         //frm.strWsd2 = gridView1.GetRowCellDisplayText(rows[0], "WsdAddr2").ToString();
         //frm.strFire2 = gridView1.GetRowCellDisplayText(rows[0], "FireAddr2").ToString();
         //frm.strAir = gridView1.GetRowCellDisplayText(rows[0], "AirAddr").ToString();
         //frm.strFactory = gridView1.GetRowCellDisplayText(rows[0], "AirFactory").ToString();
         //frm.strAir2 = gridView1.GetRowCellDisplayText(rows[0], "AirAddr2").ToString();
         //frm.strFactory2 = gridView1.GetRowCellDisplayText(rows[0], "AirFactory2").ToString();
         //frm.IsExistCsj = gridView1.GetRowCellDisplayText(rows[0], "IsExistCsj").ToString() == DeviceUsing.启用.ToString() ? true : false;
         //frm.IsExistJrq = gridView1.GetRowCellDisplayText(rows[0], "IsExistJrq").ToString() == DeviceUsing.启用.ToString() ? true : false;
         //frm.IsExistXf = gridView1.GetRowCellDisplayText(rows[0], "IsExistXf").ToString() == DeviceUsing.启用.ToString() ? true : false;
         //frm.ShowDialog(this);
         //frm.Dispose();
         //LoadAndUpShow();
     }
     else
     {
         MessageUtil.ShowTips("无选中的房间");
     }
 }