Ejemplo n.º 1
0
        //нажатие мышкой на один из номеров ктс в главном меню
        private void listBox1_Click(object sender, EventArgs e)
        {
            chbWithoutNorm.Enabled = true;
            _detNumID           = dcIDDetNum[lboxDetNum.SelectedItem.ToString()];
            tbSearchDetNum.Text = lboxDetNum.SelectedItem.ToString();

            LinqQueryForTrudoyomkost.FillLabourListForSelectDet(_detNumID, ref FillTrudoyomkostDB.CurrentLabourNormList);

            LinqQueryForTrudoyomkost.SetWhereUseDt(_dtWhereUse, _depList, _infProductsDc, _detNumID);

            _taskNumbers = LinqQueryForTrudoyomkost.SelectAllTaskNum();
            cboxChangeTaskNum.DataSource = _taskNumbers;

            var tempResult2 = from infdet in _infDetList
                              join depList in _depList
                              on infdet.DepProducer equals depList.ID
                              where infdet.ID == _detNumID
                              select new
            {
                depList.Code
            };

            _depProducer = tempResult2.First().Code.ToString();

            lbDepProducer.Text   = _depProducer;
            lbDetNum.Text        = lboxDetNum.SelectedItem.ToString();
            lbNormMapNumber.Text = _detNumID.ToString();

            FillTrudoyomkostDB.NormMapNumber = lbNormMapNumber.Text;

            CreateMaxApplyDc(new List <string>()
            {
                "158", "148", "70"
            });
        }