private void dgvEmpresas_CellContentClick(object sender, DataGridViewCellEventArgs e) { string razon_social = dgvEmpresas.CurrentRow.Cells[0].Value.ToString(); string mail = dgvEmpresas.CurrentRow.Cells[1].Value.ToString(); string telefono = dgvEmpresas.CurrentRow.Cells[2].Value.ToString(); string calle = dgvEmpresas.CurrentRow.Cells[3].Value.ToString(); string nro_calle = dgvEmpresas.CurrentRow.Cells[4].Value.ToString(); string depto = dgvEmpresas.CurrentRow.Cells[5].Value.ToString(); string localidad = dgvEmpresas.CurrentRow.Cells[6].Value.ToString(); string codigo_postal = dgvEmpresas.CurrentRow.Cells[7].Value.ToString(); string ciudad = dgvEmpresas.CurrentRow.Cells[8].Value.ToString(); string ciut = dgvEmpresas.CurrentRow.Cells[9].Value.ToString(); string username = dgvEmpresas.CurrentRow.Cells[10].Value.ToString(); bool habilitada = ConnectionFactory.Instance() .CreateConnection() .ExecuteSingleOutputSqlQuery <bool>(@"SELECT habilitado FROM LOS_DE_GESTION.Usuario WHERE username="******"'" + username + "'"); NavigableFormUtil.ForwardTo(this, new ModificacionEmpresa(razon_social, mail, telefono, calle, nro_calle, depto, localidad, codigo_postal, ciudad, ciut, username, habilitada, this)); }
private void gridProveedores_CellContentClick(object sender, DataGridViewCellEventArgs e) { int idProveedor = Int32.Parse(gridProveedores.CurrentRow.Cells[0].Value.ToString()); Console.WriteLine(idProveedor); NavigableFormUtil.ForwardTo(this, new CrearOferta(previousForm, idProveedor)); }
private bool TieneTarjeta() { if (!clienteRepository.ClienteTieneTarjeta(Session.Instance().LoggedUsername)) { MessageBoxUtil.ShowError("No se puede realizar la compra, no tiene una tarjeta asociada."); NavigableFormUtil.ForwardTo(this, new AsociarTarjeta(this)); return(false); } return(true); }
private void btnSeleccionar_Click(object sender, EventArgs e) { try { string codigoPublicacion = dgvResultados.SelectedRows[0].Cells[0].Value.ToString(); NavigableFormUtil.ForwardTo(this, new UbicacionesForm(this, codigoPublicacion)); } catch (ArgumentOutOfRangeException) { MessageBoxUtil.ShowError("Seleccione una fila válida."); } }
private void btnAceptar_Click(object sender, EventArgs e) { if (cmbFuncionalidades.SelectedItem == null) { MessageBoxUtil.ShowError("Seleccione una funcionalidad"); } else { int funcionalidadId = ((ComboBoxItem <int>)cmbFuncionalidades.SelectedItem).Value; NavigableFormUtil.ForwardTo(this, GetSelectedForm(funcionalidadId)); } }
private void btnEditar_Click(object sender, EventArgs e) { if (dgvPublicaciones.SelectedRows.Count == 0) { MessageBox.Show("Por favor seleccione una fila"); } else { NavigableFormUtil.ForwardTo(this, new EditarPublicacionSeleccionada( decimal.Parse(dgvPublicaciones.SelectedRows[0].Cells[0].Value.ToString()), this) ); } }
private void btnAceptar_Click(object sender, EventArgs e) { if (cmbFuncionalidades.SelectedItem == null) { MessageBoxUtil.ShowError("Seleccione una funcionalidad."); } else { decimal selectedItemId = ((ComboBoxItem <decimal>)cmbFuncionalidades.SelectedItem).Value; NavigableFormUtil.ForwardTo(this, PostLoginFormFactory.CreateForm(selectedItemId, this)); } }
private void btnAceptar_Click(object sender, EventArgs e) { if (this.validarUseryPass()) { if (this.comboUserType.Text.Equals("Cliente")) { NavigableFormUtil.ForwardTo(this, new RegistroAltaCliente(this, txtUserName.Text, txtUserPass.Text)); } else if (this.comboUserType.Text.Equals("Proveedor")) { NavigableFormUtil.ForwardTo(this, new RegistroAltaProveedor(this, txtUserName.Text, txtUserPass.Text)); } } }
private void dgvClientes_CellContentClick(object sender, DataGridViewCellEventArgs e) { string username = dgvClientes.CurrentRow.Cells[0].Value.ToString(); string nombre = dgvClientes.CurrentRow.Cells[1].Value.ToString(); string apellido = dgvClientes.CurrentRow.Cells[2].Value.ToString(); string tipo_documento = dgvClientes.CurrentRow.Cells[3].Value.ToString(); string nro_documento = dgvClientes.CurrentRow.Cells[4].Value.ToString(); string CUIL = dgvClientes.CurrentRow.Cells[5].Value.ToString(); string mail = dgvClientes.CurrentRow.Cells[6].Value.ToString(); string telefono = dgvClientes.CurrentRow.Cells[7].Value.ToString(); string calle = dgvClientes.CurrentRow.Cells[8].Value.ToString(); string nro_calle = dgvClientes.CurrentRow.Cells[9].Value.ToString(); string nro_piso = dgvClientes.CurrentRow.Cells[10].Value.ToString(); string depto = dgvClientes.CurrentRow.Cells[11].Value.ToString(); string localidad = dgvClientes.CurrentRow.Cells[12].Value.ToString(); string codigo_postal = dgvClientes.CurrentRow.Cells[13].Value.ToString(); string fecha_nacimiento = dgvClientes.CurrentRow.Cells[14].Value.ToString(); string fecha_creacion = dgvClientes.CurrentRow.Cells[15].Value.ToString(); string tarjeta = dgvClientes.CurrentRow.Cells[16].Value.ToString(); bool habilitado = ConnectionFactory.Instance() .CreateConnection() .ExecuteSingleOutputSqlQuery <bool>(@"SELECT habilitado FROM LOS_DE_GESTION.Usuario WHERE username ="******"'" + username + "'"); NavigableFormUtil.ForwardTo(this, new ModificacionCliente(habilitado, username, nombre, apellido, tipo_documento, nro_documento, CUIL, mail, telefono, calle, nro_calle, nro_piso, depto, localidad, codigo_postal, fecha_nacimiento, fecha_creacion, tarjeta, this)); }
private void button1_Click(object sender, EventArgs e) { string selectedRol = cbRol.Text; IdRol = ConnectionFactory.Instance().CreateConnection().ExecuteSingleOutputSqlQuery <decimal>(@"SELECT id_Rol FROM LOS_DE_GESTION.Rol WHERE nombre=" + "'" + selectedRol + "'"); //Si es una modificacion ir a la pantalla modificacion if (Option == 1) { NavigableFormUtil.ForwardTo(this, new ModificacionRol(IdRol, this)); } //Si no ir a la pantalla de baja else { NavigableFormUtil.ForwardTo(this, new ABMRol.BajaRolForm(this, IdRol)); } }
private void dgvUsuarios_CellContentClick(object sender, DataGridViewCellEventArgs e) { int idUsuario = int.Parse(dgvUsuarios.CurrentRow.Cells["id_usuario"].Value.ToString()); bool habilitado = bool.Parse(dgvUsuarios.CurrentRow.Cells["habilitado"].Value.ToString()); string username = dgvUsuarios.CurrentRow.Cells["username"].Value.ToString(); if (MessageBox.Show("¿Desea modificar la contraseña del usuario " + username + " ?", "Atención", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) == DialogResult.OK) { if (!habilitado) { MessageBoxUtil.ShowError("El usuario ya se encontraba deshabilitado"); } else { NavigableFormUtil.ForwardTo(this, new ModificarPasswordUsuario(idUsuario, this)); } } }
private void btnSiguiente_Click(object sender, EventArgs e) { if (controlValidator.Validate()) { decimal selectedRolId = ((ComboBoxItem <decimal>)cmbRoles.SelectedItem).Value; Usuario newUser = UsuarioFactory.CrearNuevoUsuario(selectedRolId, txtUsername.Text, txtPassword.Text); try { IAccionPostCreacionUsuario accionPostCreacion = new VolverALogin(this); NavigableFormUtil.ForwardTo(this, ABMClienteEmpresaFormFactory.CrearForm(selectedRolId, this, newUser, accionPostCreacion)); } catch (StoredProcedureException ex) { MessageBoxUtil.ShowError(ex.Message); } } }
private void btnLogin_Click(object sender, EventArgs e) { RepositorioUsuarios repositorioUsuarios = new RepositorioUsuarios(); RepositorioRoles repositorioRoles = new RepositorioRoles(); try { int idUsuario = repositorioUsuarios.ObtenerIdUsuarioAPartirDeCredenciales(inputUsername.Text, inputPassword.Text); Session.Instance.OpenSession(idUsuario); IList <Rol> rolesUsuario = repositorioRoles.ObtenerRolesDeUsuario(idUsuario); NavigableFormUtil.ForwardTo(this, new SeleccionarFuncionalidad.SeleccionarFuncionalidad(this, rolesUsuario)); } catch (SqlException ex) { MessageBoxUtil.ShowError(ex.Message); } }
private void btnLogin_Click(object sender, EventArgs e) { try { usuarioRepository.ExisteUsuarioYContrasenia(txtUsername.Text, txtPassword.Text); if (usuarioRepository.EsUsuarioMigrado(txtUsername.Text)) { MessageBoxUtil.ShowInfo("Debe modificar su contraseña."); NavigableFormUtil.ForwardTo(this, new RegistroUsuario.ModificarPasswordUsuarioForm(txtUsername.Text, this)); } else { Session.Instance().OpenSession(txtUsername.Text); Rol userRol = rolRepository.IdRolDeUsuario(txtUsername.Text); NavigableFormUtil.ForwardTo(this, new SeleccionarFuncionalidadForm(this, userRol)); } } catch (StoredProcedureException ex) { MessageBoxUtil.ShowError(ex.Message); } }
private void btnModificarCliente_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ModificarProveedor(this)); }
private void btnBaja_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMEmpresaEspectaculo.BajaEmpresa(this)); }
// Alta Cliente private void altaCliente_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new AltaCliente(this)); }
private void button2_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMRol.SeleccionRol(this, OPTION_MODIFICACION)); }
private void btnBaja_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new SeleccionRol(this, OPTION_BAJA)); }
private void btnBaja_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new BajaRol(this)); }
private void button1_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMRol.AltaRol(this)); }
private void btnModFuncs_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new frmModificarFuncionalidades(IdRol, this)); }
private void btnModificar_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ModificarRol(this)); }
private void button2_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMCliente.ListadoClientes(this)); }
private void btnAltaProveedor_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new AltaProveedor(this)); }
private void btnLimpiar_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new RegistroDeUsuario(previusForm)); }
private void button2_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMEmpresaEspectaculo.ListadoEmpresa(this)); }
private void button3_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new ABMCliente.BajaCliente(this)); }
private void btnRegistrarse_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new RegistroDeUsuario(this)); }
private void btnModNombre_Click(object sender, EventArgs e) { NavigableFormUtil.ForwardTo(this, new frmModificarNombre(IdRol, this)); }