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();
            }
        }
Beispiel #2
0
 partial void DeleteSTUDENT(STUDENT instance);
Beispiel #3
0
 partial void UpdateSTUDENT(STUDENT instance);
Beispiel #4
0
 partial void InsertSTUDENT(STUDENT instance);