Exemplo n.º 1
0
 private void buttonLogin_Click(object sender, EventArgs e)
 {
     ((Button)sender).Enabled = false;
     ((Button)sender).Text = "בבדיקה...";
     if (_tries == 3)
         return;
     
     try
     {
         _user = (from c in Db.Table_Users
                 where (c.UserName == textBoxUserName.Text && c.Password == textBoxPassword.Text)
                 select c).Single();
         _role = (from c in Db.Table_LookupRoles
                  where _user.RoleId == c.RoleId
                  select c).Single();
         _currentUser = _user.FirstName + _user.LastName;
         _currentRoleId = _role.RoleId;
         ActivateAdminForm();
     }
     catch (Exception ex)
     {
         MessageBox.Show("שם משתמש ו/או סיסמה שגויים");
         ((Button)sender).Enabled = true;
         ((Button)sender).Text = "כניסה";
         _tries++;
     }
 }
Exemplo n.º 2
0
 partial void UpdateTable_User(Table_User instance);
Exemplo n.º 3
0
 partial void DeleteTable_User(Table_User instance);
Exemplo n.º 4
0
 partial void InsertTable_User(Table_User instance);