private void button3_Click(object sender, EventArgs e)
        {
            string nid = textboxsearchNID.Text;

            LoginSt ob = DB.LoginSts.SingleOrDefault(x => x.NID == nid);

            //    Criminal ob = DB.Criminals.SingleOrDefault(st => st.NID ==textboxsearchNID);
            if (ob != null)
            {
                DB.LoginSts.DeleteOnSubmit(ob);
                DB.SubmitChanges();
                MessageBox.Show("Staff Deleted");
            }
            else
            {
                MessageBox.Show("Error");
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            DDBDataContext DB  = new DDBDataContext();
            LoginSt        obp = new LoginSt();

            obp.username = textBoxusername.Text;
            obp.password = textBoxpassword.Text;
            obp.NID      = textboxNID.Text;


            DB.LoginSts.InsertOnSubmit(obp);

            try
            {
                DB.SubmitChanges();
                MessageBox.Show("Inserted.");
            }
            catch (Exception)
            {
                MessageBox.Show("Error");
            }
        }
Esempio n. 3
0
 partial void DeleteLoginSt(LoginSt instance);
Esempio n. 4
0
 partial void UpdateLoginSt(LoginSt instance);
Esempio n. 5
0
 partial void InsertLoginSt(LoginSt instance);