private void Back_Click(object sender, EventArgs e) { TeacherDetails obj = new TeacherDetails(); obj.Show(); this.Hide(); }
public void Button1_Click(object sender, EventArgs e) { if (textBox1.Text != null) { AutoincIDTeachr++; var storeData = store.Where(i => i.Id == ia).FirstOrDefault(); store.Remove(storeData); Teacher columns = new Teacher(); columns.Name = textBox1.Text; columns.Id = AutoincIDTeachr; columns.Department = textBox3.Text; columns.Subject = textBox4.Text; store.Add(columns); EmptyBox(); TeacherDetails obj = new TeacherDetails(); obj.Show(); ia = 0; } this.Hide(); }