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"); } }
partial void Updateadmindb(admindb instance);
partial void Deleteadmindb(admindb instance);
partial void Insertadmindb(admindb instance);