public MenuPrincipal(Comercio datosComercio, UserPass a)
 {
     InitializeComponent();
     this.txtEmpleadoLogeado.Text = a.txtUsuario.Text;
     this.txtLegajo.Text          = a.txtLegajo.Text;
     miComercio = datosComercio;
 }
Esempio n. 2
0
        private void dtgLogin_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex >= 0)
                {
                    DataGridViewRow linea = this.dtgLogin.Rows[e.RowIndex];
                    nombreUsuario = linea.Cells["nombreEmpleado"].Value.ToString();
                    apellidoUsuario = linea.Cells["apellidoEmpleado"].Value.ToString();
                    legajo = linea.Cells["legajoEmpleado"].Value.ToString();
                }

                this.Hide();

                UserPass formInicioSesion = new UserPass();
                formInicioSesion.txtUsuario.Text = nombreUsuario + " " + apellidoUsuario;
                formInicioSesion.txtLegajo.Text = legajo;
                formInicioSesion.Show();

            }
            catch(Exception )
            {
               
            }
            

            
        }