private void button1_Click(object sender, EventArgs e) { /*AdminLogin ad = new AdminLogin(); * ad.Show(); * this.Hide();*/ using (DataClasses1DataContext DB = new DataClasses1DataContext()) { // string date = DateTime.Now.ToShortDateString(); STUDENT s = new STUDENT(); s.Id = textBox8.Text; s.Password = textBox9.Text; s.Name = textBox1.Text; s.Fatthers_Name_ = textBox2.Text; s.Mathers_Name = textBox3.Text; s.Address = textBox5.Text; s.Parents_Mibile_ = textBox6.Text; //s.DOB = DateTime.Parse(dateTimePicker1); s.Mail_Address = textBox5.Text; DB.STUDENTs.InsertOnSubmit(s); DB.SubmitChanges(); MessageBox.Show("STUDENT ADDED"); AdminStudent A = new AdminStudent(); A.Show(); this.Hide(); } }
private void button3_Click(object sender, EventArgs e) { /*Registrationpage r = new Registrationpage(); * r.Show(); * this.Hide();*/ AdminStudent ad = new AdminStudent(); ad.Show(); this.Hide(); }