示例#1
0
 public void loadData()
 {
     try
     {
         checkPermission();
         layout.load(gridViewTinhTrang);
         editGUI("view");
         if (isThietBi)
         {
             listTinhTrang = TinhTrang.getAllForTHIETBI();
         }
         else
         {
             listTinhTrang = TinhTrang.getAllForSUCOPHONG();
         }
         if (listTinhTrang.Count == 0)
         {
             enableButton(false);
         }
         gridControlTinhTrang.DataSource = listTinhTrang;
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData: " + ex.Message);
     }
 }
示例#2
0
 public void loadData(Phong obj = null)
 {
     try
     {
         layout.load(gridViewSuCo);
         List <PTB.DataFilter.ViTriHienThi> listViTri = PTB.DataFilter.ViTriHienThi.getAllHavePhong();
         _ucTreeViTri.loadData(listViTri);
         List <TinhTrang> listTinhTrang = TinhTrang.getAllForSUCOPHONG();
         lookUpEditTinhTrang.Properties.DataSource = listTinhTrang;
         if (obj == null)
         {
             objPhong = _ucTreeViTri.getPhong();
         }
         else
         {
             objPhong = obj;
             _ucTreeViTri.setPhong(objPhong);
         }
         loadDataByPhong();
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData: " + ex.Message);
     }
 }