Ejemplo n.º 1
0
 public HomeGUI(LoginGUI form, LoginCL login)
     : this()
 {
     this.form = form;
     this.login = login;
     loadData();
     SellGUI sell = new SellGUI(login);
     FillPanel(sell);
 }
Ejemplo n.º 2
0
 public SellGUI(LoginCL log)
     : this()
 {
     this.login = log;
     txtSeller.Text = login.User;
 }
Ejemplo n.º 3
0
 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;
 }
Ejemplo n.º 4
0
 public PasswordGUI(LoginCL login)
     : this()
 {
     this.login = login;
     txtAccount.Text = login.User;
 }