Ejemplo n.º 1
0
Archivo: STK.cs Proyecto: bartkkon/SAT
        private void ManulaUpadte(decimal Year)
        {
            DataTable STKTable = new DataTable();

            Data_Import.Singleton().Load_TxtToDataTable2(ref STKTable, "STK");

            if (STKTable.Columns.Contains(Year.ToString()))
            {
                DialogResult Results = MessageBox.Show("Dane STK na rok " + Year.ToString() + " istnieją!. Czy zamienić je ?", "Uwaga", MessageBoxButtons.YesNo);
                if (Results == DialogResult.Yes)
                {
                    STKTable.Columns.Remove(Year.ToString());
                    STKTable.Columns.Remove("STK/" + Year.ToString());
                }
                else
                {
                    return;
                }
            }

            STKTable.Columns.Add(Year.ToString());
            STKTable.Columns.Add("STK/" + Year.ToString());

            Data_Import.Singleton().Save_DataTableToTXT2(ref STKTable, "STK");
            _ = new AddData("Sprowadz dane dla STK", Year);
            //Data.Show();
        }
Ejemplo n.º 2
0
        public void Pb_PNCSpec_Click(object sender, EventArgs e)
        {
            Form AddData           = new AddData("Proszę podać liste PNC", "PNCSpec");
            int  DG_RowsCountStart = ((DataGridView)MainProgram.Self.TabControl.Controls.Find("dg_PNC", true).First()).Rows.Count;

            AddData.ShowDialog();
            int DG_RowsCountFinish = ((DataGridView)MainProgram.Self.TabControl.Controls.Find("dg_PNC", true).First()).Rows.Count;

            if (DG_RowsCountStart != DG_RowsCountFinish)
            {
                action.Action_STKCalcNeed();
                action.Action_ChangeInAction();
            }
        }
Ejemplo n.º 3
0
        public void Pb_AdminSaveQuantityMonth_Click(object sender, EventArgs e)
        {
            NumericUpDown num_Year  = (NumericUpDown)mainProgram.TabControl.Controls.Find("num_Admin_YearMonth", true).First();
            NumericUpDown num_Month = (NumericUpDown)mainProgram.TabControl.Controls.Find("num_Admin_QuantityMonth", true).First();
            CheckBox      cb_ANC    = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminANCMonth", true).First();
            CheckBox      cb_PNC    = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminPNCMonth", true).First();

            if (cb_ANC.Checked)
            {
                Form AddData = new AddData("Proszę podać liste " + cb_ANC.Text + " dla " + num_Month.Value.ToString() + "/" + num_Year.Value.ToString(), "AddMonthANC");
                AddData.Show();
            }
            if (cb_PNC.Checked)
            {
                Form AddData = new AddData("Proszę podać liste " + cb_PNC.Text + " dla " + num_Month.Value.ToString() + "/" + num_Year.Value.ToString(), "AddMonthPNC");
                AddData.Show();
            }
        }
Ejemplo n.º 4
0
        public void Pb_AdminSaveQuantity_Click(object sender, EventArgs e)
        {
            CheckBox cb_AdminPNC = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminPNC", true).First();
            CheckBox cb_AdminANC = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminANC", true).First();
            CheckBox cb_AdminBU  = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminBU", true).First();
            CheckBox cb_AdminEA1 = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminEA1", true).First();
            CheckBox cb_AdminEA2 = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminEA2", true).First();
            CheckBox cb_AdminEA3 = (CheckBox)mainProgram.TabControl.Controls.Find("cb_AdminEA3", true).First();
            string   What        = "";

            if (cb_AdminBU.Checked)
            {
                What = cb_AdminBU.Text;
            }
            if (cb_AdminEA1.Checked)
            {
                What = cb_AdminEA1.Text;
            }
            if (cb_AdminEA2.Checked)
            {
                What = cb_AdminEA2.Text;
            }
            if (cb_AdminEA3.Checked)
            {
                What = cb_AdminEA3.Text;
            }

            //admin.Admin_QuantityAddBudget((sender as CheckBox).Text);
            if (cb_AdminPNC.Checked)
            {
                Form AddData = new AddData("Proszę podać liste " + cb_AdminPNC.Text, What);
                AddData.Show();
            }
            if (cb_AdminANC.Checked)
            {
                Form AddData = new AddData("Proszę podać liste " + cb_AdminANC.Text, What);
                AddData.Show();
            }
        }