Esempio n. 1
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));
        }
Esempio n. 2
0
        public void InitializeFormElemets()
        {
            Type t = _normTotalbyTheJob.GetType();

            PropertyInfo[] pinfo = t.GetProperties();
            int            i     = 0;

            foreach (var p in pinfo)
            {
                dgTotal.Columns.Add(p.Name, "");
                dgTotal.Columns[i].Width = 60;
                i++;
            }

            foreach (var item in FillTrudoyomkostDB.DcMaxApply)
            {
                _lboxMaxSeriaInfo.Items.Add(item.Key + "   Серия С " +
                                            MathFunctionForSeries.GetStringSeriaNumber(item.Value.SeriaFrom)
                                            + "   Серия По " +
                                            MathFunctionForSeries.GetStringSeriaNumber(item.Value.SeriaTo));
            }


            LinqQueryForTrudoyomkost.FilldtNormViewer(_seriaFrom, _seriaTo, _infProdChipher,
                                                      ref _dtLabourNorm, rbHours.Checked, ref _normTotalbyTheJob, ref _normTotalByTheTime);

            LinqQueryForTrudoyomkost.FilldcOperApply(ref _dcApplyOper);
            UpdateDgTotal();

            cboxTariff.DataSource            = FillTrudoyomkostDB.tariffList;
            cboxTariff.SelectedIndex         = cboxTariff.Items.IndexOf(TrudoyomkostSettings.TariffNetNum);
            cboxTariff.SelectedValueChanged += new System.EventHandler(cboxTariff_SelectedValueChanged);

            //Filing _dcApplyOper during Form loading...

            dgOperViewer.DataSource = _dtLabourNorm;
            dgOperApply.DataSource  = _dtOperApply;
            lbDetNum.Text           = _detNum;

            labelVsDetName.Text = _detName;
            //  labelVsDetName.Text = _detName;

            vtbSeriaFrom.StringAutoCorrectionMethod = VtboxMethods.correctForInt;
            vtbSeriaFrom.ValidateValue            = VtboxMethods.CheckSeria;
            vtbSeriaTo.StringAutoCorrectionMethod = VtboxMethods.correctForInt;
            vtbSeriaTo.ValidateValue  = VtboxMethods.CheckSeria;
            vtbProdName.ValidateValue = CheckProdNume;
            vtbProdName.StringAutoCorrectionMethod = VtboxMethods.correctForInt;
        }