예제 #1
0
 private void Add_click(object seneder, RoutedEventArgs e)
 {
     using (Test1Entities db = new Test1Entities())
     {
         string vs = GetHash(Byts.Text);
         T1     t1 = new T1 {
             I1 = Convert.ToInt32(Ints.Text), I2 = vs
         };
         db.T1.Add(t1);
         db.SaveChanges();
     }
 }
예제 #2
0
        private void Srav_Click(object sender, RoutedEventArgs e)
        {
            Test1Entities db = new Test1Entities();

            db.T1.Load();
            BindingList <T1> t1 = db.T1.Local.ToBindingList();

            foreach (var i in t1)
            {
                string vs = GetHash(Byts.Text);
                MessageBox.Show(vs);
                if (i.I1 == Convert.ToInt32(Ints.Text) && i.I2 == vs)
                {
                    MessageBox.Show("Darova");
                }
            }
        }