Beispiel #1
0
        public frmReport()
        {
            InitializeComponent();
            this.Size = new System.Drawing.Size(this.Size.Width, HeightNormal);

            comboBoxEdit_LoaiBaoCao.SelectedIndex = 0;

            dateEdit_TuNgay.DateTime  = DateTime.Today.Date;
            dateEdit_DenNgay.DateTime = DateTime.Today.Date;
            dateEdit_Nam.DateTime     = DateTime.Today.Date;

            ucComboBoxLoaiTS_LoaiTaiSan.showCheck();
            ucComboBoxLoaiTS_LoaiTaiSan.DataSource = LoaiTSHienThi.Convert(LoaiTaiSan.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten));

            DonVi objNULL = new DonVi();

            ListDonVi      = DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
            objNULL.id     = Guid.Empty;
            objNULL.ten    = "[Không có đơn vị]";
            objNULL.parent = null;
            ListDonVi.Insert(0, objNULL);
            ucComboBoxDonVi_ChonDonVi.DataSource = ListDonVi;
            ucComboBoxDonVi_ChonDonVi.DonVi      = objNULL;

            checkedComboBoxEdit_ChonCoSo.Properties.DataSource = CoSo.getQuery().OrderBy(c => c.order).ToList();
        }
 public void loadData()
 {
     try
     {
         editGUI("view");
         listLoaiTaiSan            = LoaiTaiSan.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
         treeListLoaiTS.DataSource = LoaiTSHienThi.Convert(listLoaiTaiSan);
         loadDonViTinh();
         LoaiTaiSan LoaiTaiSanNULL = new LoaiTaiSan();
         LoaiTaiSanNULL.id     = Guid.Empty;
         LoaiTaiSanNULL.ten    = "[Không thuộc loại nào]";
         LoaiTaiSanNULL.parent = null;
         List <LoaiTaiSan> listLoaiTaiSanParent = new List <LoaiTaiSan>(listLoaiTaiSan);
         listLoaiTaiSanParent.Insert(0, LoaiTaiSanNULL);
         _ucComboBoxLoaiTS.DataSource = listLoaiTaiSanParent;
         if (listLoaiTaiSan.Count == 0)
         {
             enableButton(false);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData:" + ex.Message);
     }
 }
Beispiel #3
0
 private void loadDataLoaiTS()
 {
     try
     {
         listLoaiTaiSan = LoaiTaiSan.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
         ucComboBoxLoaiTS1.DataSource = LoaiTSHienThi.Convert(listLoaiTaiSan);
         if (reLoadAndSetValueLoaiTS != null)
         {
             reLoadAndSetValueLoaiTS(listLoaiTaiSan);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadDataLoaiTS:" + ex.Message);
     }
 }
Beispiel #4
0
        public void loadData()
        {
            loadLayout();
            gridControlTaiSan.DataSource = null;
            ucComboBoxLoaiTS1.DataSource = null;
            ucComboBoxLoaiTS1.DataSource = LoaiTSHienThi.Convert(LoaiTaiSan.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten));
            checkedComboBoxCoSo.Properties.DataSource = CoSo.getQuery().OrderBy(c => c.order).ToList();
            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    = "[Đại học Sài Gòn]";
            objNULL.parent = null;
            list.Insert(0, objNULL);
            ucComboBoxDonVi1.DataSource = null;
            ucComboBoxDonVi1.DataSource = list;
        }
Beispiel #5
0
        public void loadData()
        {
            try
            {
                //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);
                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.getAllHavePhong();
                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;

                checkedCbxTinhTrang.Properties.DataSource = TinhTrang.getQuery().OrderBy(c => c.order).ToList();

                //ucComboBoxDonVi2.DonVi = objNULL;
                ucGridControlTaiSan1.DataSource = null;
                barBtnSuaTaiSan.Enabled         = false;
                barBtnXoaTaiSan.Enabled         = false;
                btnSua_r.Enabled = false;
                btnXoa_r.Enabled = false;

                btnClear.PerformClick();
                loadSearchXml(this.Name);
                Search();
            }
            catch (Exception ex)
            {
                Debug.WriteLine(this.Name + "->loadData:" + ex.Message);
            }
        }