Пример #1
0
        private void button1_Click(object sender, EventArgs e)
        {
            BloodDataContext D = new BloodDataContext(@"Data Source=(LocalDB)\v11.0;AttachDbFilename=F:\C# projects\finalProject\Blood Donation\Blood.mdf;Integrated Security=True;Connect Timeout=30");

            AdminInfo pr = new AdminInfo();

            if (textBox1.Text != "" && textBox2.Text != "" && textBox3.Text != "" && textBox4.Text != "")
            {
                pr.Password = textBox4.Text;
                pr.Name     = textBox2.Text;
                pr.Phone    = textBox1.Text;
                pr.Username = textBox3.Text;


                D.AdminInfos.InsertOnSubmit(pr);

                D.SubmitChanges();

                MessageBox.Show("New Admin Added");

                a.Show();
                this.Hide();
            }
            else
            {
                MessageBox.Show("Fill up all information");
            }
        }
Пример #2
0
 partial void UpdateAdminInfo(AdminInfo instance);
Пример #3
0
 partial void DeleteAdminInfo(AdminInfo instance);
Пример #4
0
 partial void InsertAdminInfo(AdminInfo instance);