예제 #1
0
 private void LoginForm_Load(object sender, EventArgs e)
 {
     using (OtodelContext otodelContext = new OtodelContext())
     {
         string username = textBox1.Text;
         string password = textBox2.Text;
         var    Result   = from employee in otodelContext.Employees
                           select employee;
     }
 }
예제 #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     using (OtodelContext otodelContext = new OtodelContext())
     {
         string username = textBox1.Text;
         string password = textBox2.Text;
         var    Result   = from employee in otodelContext.Employees
                           where employee.EmployeeMail == username && employee.Password == password
                           select employee;
         if (Result.Count() > 0)
         {
             Employee   employee   = Result.First();
             RouterForm routerForm = new RouterForm(employee);
             this.Hide();
             routerForm.Show();
         }
         else
         {
             MessageBox.Show("Çalışan bulunamadı!");
         }
     }
 }