private void Exit_Click(object sender, EventArgs e) { formRaschetZP frm1 = this.Owner as formRaschetZP; Application.OpenForms[0].Show(); Application.OpenForms[1].Hide(); }
private void Raschet_Click(object sender, EventArgs e) { Form2 frm2 = new Form2(); frm2.Show(this); if (rBtn1.Checked == true) { staj = 0; } else if (rBtn2.Checked == true) { staj = 2000; } else if (rBtn3.Checked == true) { staj = 4000; } if (rbFirst.Checked == true) { categ = 0; } else if (rbSecond.Checked == true) { categ = 1000; } else if (rbThird.Checked == true) { categ = 2000; } oplata = int.Parse(tBox1.Text); tax = int.Parse(tBox2.Text); days = int.Parse(cBox1.Text); if (lbHours.SelectedIndex == 0) { hours = 8; } else if (lbHours.SelectedIndex == 1) { hours = 6; } formRaschetZP frm1 = this.Owner as formRaschetZP; itg = (staj + categ) + (oplata * hours * days); uderj = ((tax / 100) * itg); vidano = (itg - uderj); frm2.label4.Text = itg.ToString(); frm2.label5.Text = uderj.ToString(); frm2.label6.Text = vidano.ToString(); Raschet.Enabled = false; }