Exemple #1
0
        private void butRasch_Click(object sender, EventArgs e)
        {
            AlgoritmZP alg = new AlgoritmZP();

            this.Hide();
            alg.ShowDialog();
            update();
            this.Show();
        }
Exemple #2
0
        private void butPere_Click(object sender, EventArgs e)
        {
            AlgoritmZP alg = new AlgoritmZP();

            alg.comboFio.Text    = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            alg.maskedTime.Text  = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            alg.maskedPrize.Text = dataGridView1.CurrentRow.Cells[3].Value.ToString();
            this.Hide();
            alg.ShowDialog();
            int time     = Convert.ToInt32(alg.maskedTime.Text);
            int prize    = Convert.ToInt32(alg.maskedPrize.Text);
            int oklad    = Convert.ToInt32(alg.maskedOklad.Text);
            int zarplata = alg.raschetZarplat(time, prize, oklad);

            Connection.queryExecute(@"update [Salary] set timeWok=N'" + alg.maskedTime.Text + "',prize=N'" + alg.maskedPrize.Text + "',salary = N'" + zarplata + "' where id =" + dataGridView1.CurrentRow.Cells[0].Value.ToString() + ";");
            update();
            this.Show();
        }