Ejemplo n.º 1
0
        private void FillFormData()
        {
            using (var currentContext = new TrudoyomkostDBContext(Properties.Settings.Default.TrudoyomkostDBConnectionString))
            {
                LinqQueryForTrudoyomkost.FillInfProductsList(currentContext, ref FillTrudoyomkostDB.infProductList);
                LinqQueryForTrudoyomkost.FillLabourNormList(currentContext, ref FillTrudoyomkostDB.LabourNormList);
                LinqQueryForTrudoyomkost.FillWhereOperationUseList(currentContext, ref FillTrudoyomkostDB.WhereOperationUseList);

                _whereUseList = LinqQueryForTrudoyomkost.FillWhereUselst(currentContext);
                _depList      = LinqQueryForTrudoyomkost.FillinfDeplst(currentContext);
                _infDetList   = LinqQueryForTrudoyomkost.FillinfDetList(currentContext);

                FillTrudoyomkostDB.whereUseList = _whereUseList;
                FillTrudoyomkostDB.infDetList   = _infDetList;

                LinqQueryForTrudoyomkost.FilldcInfProducts(currentContext, ref FillTrudoyomkostDB.DcInfProducts);

                _infProductsDc = FillTrudoyomkostDB.DcInfProducts;

                LinqQueryForTrudoyomkost.FilldcDetNumForProduct(ref dcIDDetNum, _infProductsDc.Values.First());
                LinqQueryForTrudoyomkost.FilldtInfProf(currentContext, ref _dtInfProf);
                LinqQueryForTrudoyomkost.GetInfTariffList(currentContext, ref FillTrudoyomkostDB.tariffList);
                LinqQueryForTrudoyomkost.FillDictDepIDCode(currentContext, ref FillTrudoyomkostDB.DicDepCodeAndId);

                _detNumList.Clear();
                foreach (var item in dcIDDetNum)
                {
                    _detNumList.Add(item.Key);
                }
            }//
        }