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"
            });
        }
Ejemplo n.º 2
0
        public void UpdateApplyDataGrid()
        {
            LinqQueryForTrudoyomkost.FillLabourListForSelectDet(_infDetID, ref FillTrudoyomkostDB.CurrentLabourNormList);
            if (TrudoyomkostSettings.IsAggregateDep && _taskNum != "")
            {
                LinqQueryForTrudoyomkost.SelectLabourNormTaskNum(_taskNum);
            }

            LinqQueryForTrudoyomkost.FilldcOperApply(ref _dcApplyOper);
            UpdateDgTotal();
            dgOperViewer_RowEnter(this.dgOperViewer, new DataGridViewCellEventArgs(0, 0));
        }
Ejemplo n.º 3
0
        public void UpdateDataGrids()
        {
            LinqQueryForTrudoyomkost.FillLabourListForSelectDet(_infDetID, ref FillTrudoyomkostDB.CurrentLabourNormList);
            if (TrudoyomkostSettings.IsAggregateDep && _taskNum != "")
            {
                LinqQueryForTrudoyomkost.SelectLabourNormTaskNum(_taskNum);
            }

            LinqQueryForTrudoyomkost.FilldcOperApply(ref _dcApplyOper);
            LinqQueryForTrudoyomkost.FilldtNormViewer(_seriaFrom, _seriaTo, _infProdChipher, ref _dtLabourNorm, rbHours.Checked, ref _normTotalbyTheJob, ref _normTotalByTheTime);
            UpdateDgTotal();
            dgOperViewer_RowEnter(this.dgOperViewer, new DataGridViewCellEventArgs(0, 0));
        }
Ejemplo n.º 4
0
        private void cboxChangeTaskNum_SelectedIndexChanged(object sender, EventArgs e)
        {
            ComboBox input = sender as ComboBox;

            if (input != null)
            {
                if (cboxChangeTaskNum.Visible == true)
                {
                    LinqQueryForTrudoyomkost.FillLabourListForSelectDet(_detNumID, ref FillTrudoyomkostDB.CurrentLabourNormList);
                    _selectTaskNumber = input.SelectedValue.ToString();
                    LinqQueryForTrudoyomkost.SelectLabourNormTaskNum(_selectTaskNumber);
                }
            }
        }