private void FrmLogin_Load(object sender, EventArgs e) { this.KeyPreview = true; this.KeyDown += new KeyEventHandler(FrmLogin_KeyDown); this.Aceptar.Click += new EventHandler(Aceptar_Click); this.Cancelar.Click += new EventHandler(Cancelar_Click); switch (TipoUsuario) { case "CAJERO": this.txtUsuario.Properties.Items.AddRange(FactoryUsuarios.getCajeros()); break; case "ADMINISTRADOR": this.txtUsuario.Properties.Items.AddRange(FactoryUsuarios.getAdministradores()); break; case "MESONERO": this.txtUsuario.Properties.Items.AddRange(FactoryUsuarios.getMesoneros()); break; } this.txtContraseña.Properties.CharacterCasing = CharacterCasing.Upper; this.txtUsuario.Properties.CharacterCasing = CharacterCasing.Upper; this.Text = Sistema; layoutControlItem1.Text = TipoUsuario.ToLower(); }
void FrmFechaCajero_Load(object sender, EventArgs e) { this.txtFecha.DateTime = fecha; this.KeyPreview = true; this.KeyDown += new KeyEventHandler(FrmLapso_KeyDown); this.Aceptar.Click += new EventHandler(Aceptar_Click); this.Cancelar.Click += new EventHandler(Cancelar_Click); this.txtCajero.Properties.Items.AddRange(FactoryUsuarios.getCajeros()); this.txtCajero.Properties.CharacterCasing = CharacterCasing.Upper; this.txtCajero.Validating += new CancelEventHandler(txtCajero_Validating); }