public HomeGUI(LoginGUI form, LoginCL login) : this() { this.form = form; this.login = login; loadData(); SellGUI sell = new SellGUI(login); FillPanel(sell); }
public SellGUI(LoginCL log) : this() { this.login = log; txtSeller.Text = login.User; }
public static LoginCL getUser(string username) { LoginCL login = null; try { SqlCommand cmd = new SqlCommand("select Accounts.Username,Accounts.Password,Employees.LastName,Employees.Title from Accounts,Employees where Accounts.EmployeeID = Employees.EmployeeID and Username = '******'", con); con.Open(); SqlDataReader dr = cmd.ExecuteReader(); if (!dr.HasRows) { login = null; } else { while (dr.Read()) { string account = dr[0].ToString(); string pass = dr[1].ToString(); string last = dr[2].ToString(); string title = dr[3].ToString(); login = new LoginCL(account, pass, last, title); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } return login; }
public PasswordGUI(LoginCL login) : this() { this.login = login; txtAccount.Text = login.User; }