private void frmImportMaterial_Load(object sender, EventArgs e) { ComboboxUtility.BindStock(autoSearchCombobox1); gridutility.BindingData(lisImportMaterial); DateTime firstDay = DateTime.Today.AddDays(1 - DateTime.Today.Day); DateTime lastDayFilter = firstDay.AddMonths(1).AddDays(-1); dtpTimeFrom.EditValue = firstDay; dtpTimeTo.EditValue = lastDayFilter; btnSearch.PerformClick(); }
private void LoadGrid() { IList <Debt> lstDebt; using (IUnitOfWork uow = new UnitOfWork()) { lstDebt = uow.DebtRepository.Search(""); uow.Commit(); } gridUtility.BindingData(lstDebt); }
private void LoadGrid() { IList <Planning> lstPlanning; using (IUnitOfWork uow = new UnitOfWork()) { lstPlanning = uow.PlanningRepository.All(dtpFromdate.DateTime, dtpTodate.DateTime); uow.Commit(); } gridUtility.BindingData <Planning>(lstPlanning); }
private void gridViewBank_RowCellClick(object sender, DevExpress.XtraGrid.Views.Grid.RowCellClickEventArgs e) { Model.Bank bank = gridUtility1.GetSelectedItem <Model.Bank>(); IList <Model.BrankBank> lstBranch = new List <Model.BrankBank>(); using (IUnitOfWork uow = new UnitOfWork()) { lstBranch = uow.BrankBankBaseRepository.GetAllBrankByBankID(bank.BankId.ToString()); uow.Commit(); } gridUtility2.BindingData(lstBranch); }
private void frmEditQuotation_Load(object sender, EventArgs e) { IList <QuotationDetail> lstQuotationDetail; using (IUnitOfWork uow = new UnitOfWork()) { lstQuotationDetail = uow.QuotationDetailRepository.Find(m_Quotation); m_Company = uow.CompanyRepository.Find(m_Company.CompanyId); uow.Commit(); } InititalizeForm(m_Quotation); gridUtility.BindingData <QuotationDetail>(lstQuotationDetail); }
private void frmProjectMain_Load(object sender, EventArgs e) { IList <Project> lstPro = new List <Project>(); using (IUnitOfWork uow = new UnitOfWork()) { lstPro = uow.ProjectBaseRepository.All(); uow.Commit(); } utility.BindingData(lstPro); dtpDateBegin.EditValue = dtpDateEnd.EditValue = DateTime.Now; }
private void LoadGrid() { DateTime fromDate = UtilityFunction.GetDatetime(dtpFromDate); DateTime toDate = UtilityFunction.GetDatetime(dtpTodate); IList <Quotation> lstQuotation; using (IUnitOfWork uow = new UnitOfWork()) { lstQuotation = uow.QuotationRepository.LookByDate(fromDate, toDate); uow.Commit(); } gridUtility.BindingData <Quotation>(lstQuotation); }
private void LoadGrid() { IList <Po> lstPo; using (IUnitOfWork uow = new UnitOfWork()) { lstPo = uow.PoRepository.Search(dtpFromDate.DateTime, dtpTodate.DateTime); uow.Commit(); } if (lstPo != null) { gridUtility.BindingData <Po>(lstPo); } }
private void LoadGrid() { IList <QuotationDetail> lstProduct; m_Po.Quotation = new Quotation(); m_Po.Quotation.QuotationCode = m_Po.QuotationCode; using (IUnitOfWork uow = new UnitOfWork()) { m_Po.Quotation = uow.QuotationRepository.Find(m_Po.QuotationCode); m_Company = uow.CompanyRepository.Find(m_Po.CompanyId); lstProduct = uow.QuotationDetailRepository.Find(m_Po.Quotation); uow.Commit(); } gridUtility.BindingData <QuotationDetail>(lstProduct); }
private void Loadsubsupplier(Model.Supplier supplier, IList <SubSupplier> lstDeputy = null) { if (m_Suplier == null) { return; } if (lstDeputy == null) { using (IUnitOfWork uow = new UnitOfWork()) { lstDeputy = uow.SubSupplierRepository.GetbySupplier(supplier); uow.Commit(); } } gridUtility1.BindingData <SubSupplier>(lstDeputy); if (lstDeputy != null) { m_Subsupplier = lstDeputy.Where(p => p.IsMain == true).FirstOrDefault(); if (m_Subsupplier == null) { m_Subsupplier = new SubSupplier(); } InitializeForm(m_Subsupplier); } //cbbIsMainDeputy.Checked = deputy.IsMain; }
private void LoadCompany() { IList <Company> lstCompany; List <CompanyClass> lstClass; List <CompanyType> lstType; using (IUnitOfWork uow = new UnitOfWork()) { lstCompany = uow.CompanyRepository.All(); lstClass = uow.CompanyRepository.AllClass(); lstType = uow.CompanyTypeRepository.All(); uow.Commit(); } gridUtility2.BindingData(lstCompany); ComboboxUtility.BindCompanyClass(cbbClass, lstClass, 0); ComboboxUtility.BindCompanyType(cbbType, lstType, 0); }
public void LoadGrid() { List <Model.Quotation> lstQuotation; using (IUnitOfWork uow = new UnitOfWork()) { if (m_Company == null) { lstQuotation = uow.QuotationRepository.Search(txtSearch.Text); } else { lstQuotation = uow.QuotationRepository.LookByCompany(m_Company); } uow.Commit(); } gridUtility.BindingData <Model.Quotation>(lstQuotation); }
public void LoadMessage(List <ErrorData> lstData) { if (_lstData == null) { _lstData = new List <ErrorData>(); } gridUtility.BindingData(_lstData); this.ShowDialog(); }
private void searchByName(string text) { IList <Product> lstProduct; using (IUnitOfWork uow = new UnitOfWork()) { lstProduct = uow.ProductRepository.FindByName(text); uow.Commit(); } gridUtility.BindingData <Product>(lstProduct); Product first = lstProduct.FirstOrDefault(); if (first == null) { return; } OpenTreeNode(first.SeriesId); }
private void ShowProductMaterial(Product product) { IList<Model.Material> lstMaterial; using (IUnitOfWork uow = new UnitOfWork()) { lstMaterial = uow.MaterialRepository.GetMaterialByProductId(product.ProductId, product.Quantity).Where(p => p.MaterialQuantity > 0).ToList(); uow.Commit(); } gridUtility.BindingData<Model.Material>(lstMaterial); }
private void loadLocationDB() { IList <Location> lstLocation = new List <Location>(); using (IUnitOfWork uow = new UnitOfWork()) { lstLocation = uow.LocationRepository.GetAll(); uow.Commit(); } gridUtility.BindingData(lstLocation); }
private void LoadGrid() { IList <DebtDetail> lstDebtDetail; using (IUnitOfWork uow = new UnitOfWork()) { lstDebtDetail = uow.DebtRepository.Find(m_Debt); uow.Commit(); } gridUtility.BindingData(lstDebtDetail); }
private void frmPaymentMethodMain_Load(object sender, EventArgs e) { IList <PaymentMethod> lstPm = new List <PaymentMethod>(); using (IUnitOfWork uow = new UnitOfWork()) { lstPm = uow.PaymentMethodRepository.All(); uow.Commit(); } gridUtility.BindingData(lstPm); }
private void loadStockDB() { IList <Stock> lstStock = new List <Stock>(); using (IUnitOfWork uow = new UnitOfWork()) { lstStock = uow.StockRepository.GetAll(); uow.Commit(); } gridUtility.BindingData(lstStock); }
private void loadUnitDB() { IList <Unit> lstUnit = new List <Unit>(); using (IUnitOfWork uow = new UnitOfWork()) { lstUnit = uow.UnitRepository.All(); uow.Commit(); } gridUtility.BindingData(lstUnit); }
private void LoadGrid(string propertyName) { IList <CustomModel.ProductProperty> lstProperty; using (IUnitOfWork uow = new UnitOfWork()) { lstProperty = uow.ProductRepository.getProperty(propertyName, m_Product); uow.Commit(); } gridUtility.BindingData <CustomModel.ProductProperty>(lstProperty); }
private void LoadStaff(int departmentId) { IList <Staff> lstStaff; using (IUnitOfWork uow = new UnitOfWork()) { lstStaff = uow.StaffRepository.FindByDepartment(departmentId); uow.Commit(); } gridUtility2.BindingData <Staff>(lstStaff); }
public void LoadGrid() { IList <Model.Department> lstDepartment; using (IUnitOfWork uow = new UnitOfWork()) { lstDepartment = uow.DepartmentRepository.All(); uow.Commit(); } gridUtility.BindingData <Model.Department>(lstDepartment); }
private void loadProductTypeDB() { IList <ProductType> lstProductType = new List <ProductType>(); using (IUnitOfWork uow = new UnitOfWork()) { lstProductType = uow.ProductTypeRepository.GetAll(); uow.Commit(); } gridUtility.BindingData(lstProductType); }
private void loadDB() { IList <Model.Bank> lstBank = new List <Model.Bank>(); using (IUnitOfWork uow = new UnitOfWork()) { lstBank = uow.BankBaseRepository.All(); } gridUtility1.BindingData(lstBank); }
private void LoadDepartment() { IList <Department> lstDepartment; using (IUnitOfWork uow = new UnitOfWork()) { lstDepartment = uow.DepartmentRepository.All(); uow.Commit(); } gridUtility1.BindingData <Department>(lstDepartment); gridUtility3.BindingData <Department>(lstDepartment); }
private void LoadGrid(IList <QuotationDetail> lstQuotationDetail, Quotation quotation) { gridUtility.BindingData <QuotationDetail>(lstQuotationDetail); m_Po.Quotation = quotation; m_Comapny = quotation.Company; m_Po.CompanyId = m_Comapny.CompanyId; m_Po.Company = m_Comapny; m_Po.QuotationCode = quotation.QuotationCode; m_Po.CreateDebt = true; InitializeForm(m_Po); isEdited = true; }
private void LoadGrid(QuotationDetail quotationDetail) { IList <QuotationDetail> lstOrigin = gridControl1.DataSource as IList <QuotationDetail>; if (lstOrigin == null) { lstOrigin = new List <QuotationDetail>(); } lstOrigin.Add(quotationDetail); gridUtility.BindingData <QuotationDetail>(lstOrigin); //gridUtility.AddNewRow<QuotationDetail>(quotationDetail); isEdited = true; }
private void loadDB(DateTime dt) { lstincome = new List <IncomeExpense>(); using (IUnitOfWork uow = new UnitOfWork()) { lstincome = uow.IncomeExpenseRepository.Find(dt); uow.Commit(); } if (lstincome == null) { return; } gridUtility.BindingData(lstincome); }
public void LoadGrid() { IList <Category> lstCategory; using (IUnitOfWork uow = new UnitOfWork()) { lstCategory = uow.CategoryRepository.All(); uow.Commit(); } if (lstCategory != null) { gridUtility.BindingData <Category>(lstCategory); } }