private void button1_Click(object sender, EventArgs e) { var frm = new AddTrain(); //this.Hide(); //frm.Closed += (hh, uu) => this.Close(); frm.Show(); }
private void button1_Click(object sender, EventArgs e) { TrainHandling.AddNewTrain(txtFrom.Text, txtTo.Text, txtDepDate.Text, txtArrDate.Text, int.Parse(txtCarsNum.Text)); var frm = new AddTrain(); this.Hide(); frm.Closed += (hh, uu) => this.Close(); }
private void button1_Click_1(object sender, EventArgs e) { var frm = new AddTrain(); frm.Show(); }