private void button4_Click(object sender, EventArgs e)
        {
            DDBDataContext DB  = new DDBDataContext();
            string         nid = textboxsearchNID.Text;

            var sres = from x in DB.LoginSts
                       where x.NID == nid
                       select x;

            dataGridView1.DataSource = sres;
        }
        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");
            }
        }