Ejemplo n.º 1
0
 public void loadData()
 {
     try
     {
         editGUI("view");
         listLoaiPhong = LoaiPhong.getQuery().OrderBy(c => c.order).ToList();
         if (listLoaiPhong.Count == 0)
         {
             enableButton(false);
         }
         gridControlLoaiPhong.DataSource = listLoaiPhong;
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData: " + ex.Message);
     }
 }
Ejemplo n.º 2
0
        public void loadData()
        {
            try
            {
                loadLayout();
                //DevExpress.XtraSplashScreen.SplashScreenManager.ShowForm(this.ParentForm, typeof(WaitFormLoad), true, true, false);
                //DevExpress.XtraSplashScreen.SplashScreenManager.Default.SetWaitFormCaption("Đang tải dữ liệu...");
                //gridControlTaiSan.DataSource = TaiSanHienThi.getAllNoDonVi();
                //DevExpress.XtraSplashScreen.SplashScreenManager.CloseForm(false);
                checkedCbxLoaiPhong.Properties.DataSource = LoaiPhong.getQuery().OrderBy(c => c.order).ToList();

                //ucComboBoxLoaiTS1.DataSource = LoaiTSHienThi.Convert(LoaiTaiSan.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten));
                List <DonVi> list    = DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
                DonVi        objNULL = new DonVi();
                objNULL.id     = Guid.Empty;
                objNULL.ten    = "[Không có đơn vị]";
                objNULL.parent = null;
                list.Insert(0, objNULL);
                ucComboBoxDonVi1.DataSource = list;
                ucComboBoxDonVi1.DonVi      = objNULL;

                List <ViTriHienThi> listViTri = ViTriHienThi.getAll();
                //ViTriHienThi objNULL2 = new ViTriHienThi();
                //objNULL2.id = Guid.Empty;
                //objNULL2.ten = "[Không có vị trí]";
                //objNULL2.parent_id = Guid.Empty;
                //objNULL2.loai = typeof(Phong).Name;
                //listViTri.Insert(0, objNULL2);
                ucComboBoxViTri1.DataSource = listViTri;

                gridControlPhong.DataSource = null;
                //loadSearchXml(this.Name);
                //Search();

                btnClear.PerformClick();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(this.Name + "->loadData:" + ex.Message);
            }
        }
Ejemplo n.º 3
0
 private void loadLoaiPhong()
 {
     gridLookUpLoai.Properties.DataSource = LoaiPhong.getQuery().OrderBy(c => c.order).ToList();
 }