private void adminsave_Click(object sender, RoutedEventArgs e)
        {
            // INSERT : CODE



            try
            {
                if (namet.Text == "" || mobilet.Text == "" || nict.Text == "" || passt.Password == "" || cpasst.Password == "")
                {
                    MessageBox.Show("Don't Leave Any TextBox Empty !");
                }
                else
                {
                    var d = new airlinqDataContext();
                    var c = new admindb();

                    c.name   = namet.Text;
                    c.mobile = mobilet.Text;
                    c.nic    = nict.Text;
                    c.pass   = passt.Password;
                    c.cpass  = cpasst.Password;

                    d.admindbs.InsertOnSubmit(c);
                    d.SubmitChanges();

                    namet.Text = ""; mobilet.Text = "0"; nict.Text = "0"; passt.Password = ""; cpasst.Password = "";

                    MessageBox.Show("Inserted Successfully");
                } // else closing
            }
            catch
            {
                MessageBox.Show("Issue With Database Handling ! Contact Database Administrator");
            }
        }
Example #2
0
 partial void Updateadmindb(admindb instance);
Example #3
0
 partial void Deleteadmindb(admindb instance);
Example #4
0
 partial void Insertadmindb(admindb instance);