private void textBox2_TextChanged(object sender, EventArgs e)
        {
            all_classDataContext db = new all_classDataContext();
            string search_text      = TechID.Text;
            var    prods            = from p in db.Teachers
                                      where p.Name.Contains(search_text)
                                      select new { p.Id, p.Name, p.Notes, p.Note_Id };

            dgv.DataSource = prods;
        }
        private void button3_Click(object sender, EventArgs e)
        {
            all_classDataContext db = new all_classDataContext();
            int     id  = _2nd_frame.Getid();
            student stu = db.students.SingleOrDefault(x => x.Student_Id == id);

            stu.Password = pass.Text;
            //prod.price = float.Parse(textBox2.Text);
            db.SubmitChanges();
            MessageBox.Show("password changed");
        }
Beispiel #3
0
 private void button12_Click(object sender, EventArgs e)
 {
     if (pass_fld.Text == "")
     {
         MessageBox.Show(" Empty feild ");
     }
     else
     {
         all_classDataContext db = new all_classDataContext();
         int     id  = _2nd_frame.Getid();
         Teacher stu = db.Teachers.SingleOrDefault(x => x.teacher_Id == id);
         stu.Password = pass_fld.Text;
         //prod.price = float.Parse(textBox2.Text);
         db.SubmitChanges();
         MessageBox.Show("password changed");
     }
 }