private void Search()
        {
            _projectDataContext       = new ProjectDataContext();
            _productionPlanRepository = new ProductionPlanRepository(_projectDataContext);
            DateTime fromDate = DateTime.Parse(dtpFromDate.Value.ToString("yyyy-MM-dd 00:00:00"));
            DateTime toDate   = DateTime.Parse(dtpToDate.Value.ToString("yyyy-MM-dd 23:59:59"));

            dgvDuLieu.DataSource = _productionPlanRepository.GetReportSyntheticProductionPlan(fromDate, toDate).OrderBy(_ => _.PartNo);
            Control();
        }
Exemplo n.º 2
0
        private void Search()
        {
            _projectDataContext       = new ProjectDataContext();
            _productionPlanRepository = new ProductionPlanRepository(_projectDataContext);
            List <Expression <Func <ProductionPlan, bool> > > expressions = new List <Expression <Func <ProductionPlan, bool> > >();
            DateTime fromDate = DateTime.Parse(dtpFromDate.Value.ToString("yyyy-MM-dd 00:00:00"));
            DateTime toDate   = DateTime.Parse(dtpToDate.Value.ToString("yyyy-MM-dd 23:59:59"));

            expressions.Add(_ => _.ExpectedDeliveryDate >= fromDate && _.ExpectedDeliveryDate <= toDate);
            dgvDuLieu.DataSource = _productionPlanRepository.Find(expressions).OrderBy(_ => _.WorkOrder);
            Control();
        }
 private void frmProductionPlanAddEdit_Load(object sender, EventArgs e)
 {
     _productionPlanRepository = new ProductionPlanRepository(_projectDataContext);
     _partNumberRepository     = new PartNumberRepository(_projectDataContext);
     LanguageTranslate.ChangeLanguageForm(this);
     LoadPartNumberData();
     if (String.IsNullOrEmpty(_id))
     {
         Clear();
     }
     else
     {
         Close();
     }
 }