private void btn_ok_Click(object sender, EventArgs e) { if (std.addLesson(Int32.Parse(textBox1.Text))) { //FileStream file = File.Create("Uni"); //BinaryFormatter bf = new BinaryFormatter(); //bf.Serialize(file, Universal.instance); //file.Close(); this.Hide(); } }
private void btn_add_Click(object sender, EventArgs e) { if (textBox1.Text == "") { errorProvider1.SetError(textBox1, "کد درسی وارد نشده است"); } else { if (std.addLesson(Convert.ToInt32(textBox1.Text))) { //FileStream file = File.Create("Uni"); //BinaryFormatter bf = new BinaryFormatter(); //bf.Serialize(file, Universal.instance); //file.Close(); this.Hide(); } } }