private void checkUserLogin() { //var users = from u in cgr.Utilizadors // where u.Username == username_textBox.Text // && u.Pass == passwordBox.Password // select u; var users = CGameR.Utilizadors.Where( u => u.Username == username_textBox.Text && u.Pass == passwordBox.Password); if (users.Count() == 1) { User user = new User(username_textBox.Text, CGameR); user.Show(); CGameR = null; users = null; this.Close(); } else loginError(); users = null; }
public AdminWin(CloudGameR_DBDataContext CGameR) { this.CGameR = CGameR; taContactType = new ContactTypeDataSetTableAdapters.TipoContactoTableAdapter(); taUser = new UserDataSetTableAdapters.UtilizadorTableAdapter(); InitializeComponent(); }
public User(string name, CloudGameR_DBDataContext CGameR) { InitializeComponent(); this.CGameR = CGameR; username_label.Content = "Welcome, " + name; CurrentUserName = name; }
public MainWindow() { InitializeComponent(); CGameR = new CloudGameR_DBDataContext(); // listBox1.ItemsSource = query; // foreach (var user in query) // { // Console.WriteLine("Nome> {0}\tPass> {1}", user.Nome, user.Pass); // } }
public NewUser(CloudGameR_DBDataContext CGameR) { InitializeComponent(); this.CGameR = CGameR; UserData = new UserDataSet(); taUser = new UserDataSetTableAdapters.UtilizadorTableAdapter(); taUserManager = new UserDataSetTableAdapters.TableAdapterManager(); CountryData = new CountryDataSet(); taPais = new CountryDataSetTableAdapters.PaisTableAdapter(); taManager = new CountryDataSetTableAdapters.TableAdapterManager(); usernameOk = false; }