Example #1
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgEstadoCivil;

            withBlock.DataSource = servicioGeneral.getEstadoCivil(3, 0);
        }
Example #2
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgGenero;

            withBlock.DataSource = servicioGeneral.GetGeneros(3, 0);
        }
        private void cargaCupocrditoMinimo()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            CupoMinimo            cupoMinimo      = servicioGeneral.getCupoMinimoCredito();

            txtCupoAsignado.Text = cupoMinimo.CUPO_MINIMO.ToString();
        }
Example #4
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgFormaIngreso;

            withBlock.DataSource = servicioGeneral.getformasIngreso(3, 0);
        }
Example #5
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgTipoDocumento;

            withBlock.DataSource = servicioGeneral.getTiposDocumento(3, 0);
        }
Example #6
0
        private void btnBuscar_Click(object sender, EventArgs e)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgResponsables;

            withBlock.DataSource = servicioGeneral.getResponsableFiltro(txtIdentificacion.Text, txtNombre.Text);
        }
Example #7
0
        private void llenaGrilla(string strCodigoSeccion)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgTerritorio;

            withBlock.DataSource = servicioGeneral.getTerritorio(3, strCodigoSeccion, string.Empty);
        }
Example #8
0
        private void dtgTerritorio_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                txtCodigoTerritorio.Text = Convert.ToString(dtgTerritorio.Rows[e.RowIndex].Cells["CODIGO"].Value);
                txtNombreTerritorio.Text = Convert.ToString(dtgTerritorio.Rows[e.RowIndex].Cells["NOMBRE"].Value);
                if (Convert.ToString(dtgTerritorio.Rows[e.RowIndex].Cells["ESTADO"].Value) == "ACTIVO")
                {
                    rbnActivo.Checked   = true;
                    rbnInactivo.Checked = false;
                }
                else if (Convert.ToString(dtgTerritorio.Rows[e.RowIndex].Cells["ESTADO"].Value) == "INACTIVO")
                {
                    rbnInactivo.Checked = true;
                    rbnActivo.Checked   = false;
                }
                else
                {
                    rbnActivo.Checked   = true;
                    rbnInactivo.Checked = true;
                }

                ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
                var territorio = servicioGeneral.getTerritorioFiltro(4, Convert.ToString(dtgTerritorio.Rows[e.RowIndex].Cells["CODIGO"].Value));

                //cboPais.SelectedValue = territorio.CODIGO_PAIS;
                //CargaRegional();
                //cboRegional.SelectedValue = territorio.CODIGO_REGIONAL;
                //cargaZona();
                //cboZona.SelectedValue = territorio.CODIGO_ZONA;
                //cargaSecciones();

                //cboSeccion.SelectedValue = territorio.CODIGO;
            }
        }
Example #9
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgTipoUnidadMedida;

            withBlock.DataSource = servicioGeneral.getUnidadMedida(3, 0);
        }
Example #10
0
        private void frmCiudades_Load(object sender, EventArgs e)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();

            dtgCiudades.ReadOnly = true;
            cargaCombos();
            if (clsConnection.blnCiudadesdesdeDepto)
            {
                llenaGrilla(clsConnection.intCodigoDepto);
                cboPais.Enabled  = false;
                cboDepto.Enabled = false;

                var depto = servicioGeneral.getDepartamentoTabla(5, 0, clsConnection.intCodigoDepto);
                if (Convert.ToInt32(depto.CODIGO_PAIS) > 0)
                {
                    cboPais.SelectedValue = Convert.ToInt32(depto.CODIGO_PAIS);
                }
                cargaDepto();
                cboDepto.SelectedValue = clsConnection.intCodigoDepto;
            }
            else
            {
                cboPais.Enabled  = true;
                cboDepto.Enabled = true;
            }
        }
Example #11
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgPaises;

            withBlock.DataSource = servicioGeneral.getPaises(3, 0);
        }
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgClases;

            withBlock.DataSource = servicioGeneral.getClaseResponsable(3, 0);
        }
Example #13
0
        private void llenaGrilla(string strCodigoZona)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgSecciones;

            withBlock.DataSource = servicioGeneral.getSecciones(3, strCodigoZona, string.Empty);
        }
Example #14
0
 private void dtgSecciones_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (e.RowIndex >= 0)
     {
         ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
         txtCodigoSeccion.Text       = Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["CODIGO"].Value);
         txtNombreSeccion.Text       = Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["NOMBRE"].Value);
         txtResponsableSeccion.Text  = Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["RESPONSABLE"].Value);
         intCodigoResponsableSeccion = Convert.ToInt32(dtgSecciones.Rows[e.RowIndex].Cells["CODIGO_RESPONSABLE"].Value);
         //var seccion = servicioGeneral.getSeccionFiltro(4, Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["CODIGO"].Value));
         //cboPais.SelectedValue = seccion.CODIGO_PAIS;
         //CargaRegional();
         //cboRegional.SelectedValue = seccion.CODIGO_REGIONAL;
         //cargaZona();
         //cboZona.SelectedValue = seccion.CODIGO;
         if (Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["ESTADO"].Value) == "ACTIVO")
         {
             rbnActivo.Checked   = true;
             rbnInactivo.Checked = false;
         }
         else if (Convert.ToString(dtgSecciones.Rows[e.RowIndex].Cells["ESTADO"].Value) == "INACTIVO")
         {
             rbnInactivo.Checked = true;
             rbnActivo.Checked   = false;
         }
         else
         {
             rbnActivo.Checked   = true;
             rbnInactivo.Checked = true;
         }
     }
 }
Example #15
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgResponsables;

            withBlock.DataSource = servicioGeneral.getResponsableTerritorio(2);
        }
Example #16
0
        private void llenaGrilla(int intCodigoPais)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgDepartamentos;

            withBlock.DataSource = servicioGeneral.getDepartamentos(3, intCodigoPais, 0);
        }
Example #17
0
        private void llenaGrilla()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgUsuarios;

            withBlock.DataSource = servicioGeneral.getUsuarios(3, string.Empty);
        }
Example #18
0
        private void llenaGrilla(int intCodigoDepartamento)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgCiudades;

            withBlock.DataSource = servicioGeneral.getCiudades(3, intCodigoDepartamento, 0);
        }
Example #19
0
        private void llenaGrilla(int intCodigoPais)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgRegionales;

            withBlock.DataSource = servicioGeneral.getRegionales(3, 0, intCodigoPais);
        }
Example #20
0
        private void llenaGrilla(string strCodigoRegional)
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = dtgZonas;

            withBlock.DataSource = servicioGeneral.getZonas(3, strCodigoRegional, string.Empty);
        }
Example #21
0
 private void llenaGrilla()
 {
     {
         ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
         var withBlock = dtgTipoCliente;
         withBlock.DataSource = servicioGeneral.getTipoCliente(3, 0);
     }
 }
Example #22
0
 private void llenaGrillaReferencias()
 {
     {
         ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
         var withBlock = dtgReferencias;
         withBlock.DataSource = servicioGeneral.getReferenciaCliente(intCodigoCliente);
     }
 }
Example #23
0
        private void cargaDepto()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = cboDepto;

            withBlock.DataSource    = servicioGeneral.getDepartamentos(1, Convert.ToInt32(cboPais.SelectedValue), 0);
            withBlock.ValueMember   = "CODIGO";
            withBlock.DisplayMember = "NOMBRE";
            withBlock.SelectedValue = 0;
        }
Example #24
0
        private void cargaCiudad()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = cboCiudad;

            withBlock.DataSource    = servicioGeneral.getCiudades(1, Convert.ToInt32(cboDepto.SelectedValue), 0);
            withBlock.ValueMember   = "CODIGO";
            withBlock.DisplayMember = "NOMBRE";
            withBlock.SelectedValue = 0;
        }
Example #25
0
        private void cargaCombos()
        {
            ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
            var withBlock = cboPais;

            withBlock.DataSource    = servicioGeneral.getPaises(1, 0);
            withBlock.ValueMember   = "CODIGO";
            withBlock.DisplayMember = "NOMBRE";
            withBlock.SelectedValue = 0;
        }
        private void validaExistecliente()
        {
            ServicioGeneralClient serviceClient = new ServicioGeneralClient();
            var datosCliente = serviceClient.getConsultaCliente(txtIdentificacion.Text);

            if (datosCliente != null)
            {
                MessageBox.Show("El número de identificación que está ingresando ya existe en el sistema", "Cuenta Existente", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                txtIdentificacion.Focus();
                foreach (Control control in this.Controls)
                {
                    if (control.Name != "Panel1")
                    {
                        control.Enabled = false;
                    }
                    foreach (Control Control in control.Controls)
                    {
                        if (Control.Name == "txtIdentificacion")
                        {
                            Control.Enabled = true;
                        }
                        else if (Control.Name == "txtNombreReferente")
                        {
                            Control.Enabled = false;
                        }
                        else
                        {
                            Control.Enabled = false;
                        }
                    }
                }
            }
            else
            {
                foreach (Control control in this.Controls)
                {
                    control.Enabled = true;
                    foreach (Control Control in control.Controls)
                    {
                        if (Control.Name == "txtNombreReferente")
                        {
                            Control.Enabled = false;
                        }
                        else
                        {
                            Control.Enabled = true;
                        }
                    }
                }
                cboTipoDocumento.Focus();
            }
        }
Example #27
0
 private void OK_Click(object sender, EventArgs e)
 {
     if (validaCampos())
     {
         LoginUsuario          loginUsuario    = new LoginUsuario();
         ServicioGeneralClient ServicioGeneral = new ServicioGeneralClient();
         loginUsuario = ServicioGeneral.ingresaAplicativo(UsernameTextBox.Text, PasswordTextBox.Text);
         if (loginUsuario != null)
         {
             if (chkAyudaEnLinea.Checked)
             {
                 clsConnection.blnAyudaEnlinea = true;
             }
             else
             {
                 clsConnection.blnAyudaEnlinea = false;
             }
             if (chkVentanas.Checked)
             {
                 clsConnection.blnVentanasEnbebidas = true;
             }
             else
             {
                 clsConnection.blnVentanasEnbebidas = false;
             }
             if (loginUsuario.intIdUsuario != 0 && loginUsuario.blnEstado)
             {
                 clsConnection.intIdUsuario           = loginUsuario.intIdUsuario;
                 clsConnection.intCodigoPerfil        = loginUsuario.intCodigoPerfil;
                 clsConnection.strNombreUsuario       = loginUsuario.strNombreUsuario;
                 clsConnection.strEmailUsuario        = loginUsuario.strEmailUsuario.ToLower();
                 clsConnection.blnActualizaConexiones = false;
                 trmActualizaConexiones.Stop();
                 this.Visible = false;
                 frmPrincipal frmPrincipal = new frmPrincipal();
                 frmPrincipal.Show();
             }
             else if (!loginUsuario.blnEstado)
             {
                 strMensaje = "El usuario " + UsernameTextBox.Text + " está INACTIVO, contacte al administrador del Sistema";
                 MessageBox.Show(strMensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
             }
         }
         else
         {
             strMensaje = "Usuario o Password inválidos";
             MessageBox.Show(strMensaje, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
         }
     }
 }
Example #28
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            if (validaCampos())
            {
                string                strResultado;
                TipoCliente           tipoCliente     = new TipoCliente();
                ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
                if (rbnActivo.Checked)
                {
                    tipoCliente.ESTADO = true;
                }
                else if (rbnInactivo.Checked)
                {
                    tipoCliente.ESTADO = false;
                }

                if (rbnSiCobraFlete.Checked)
                {
                    tipoCliente.COBRA_FLETE = true;
                }
                else if (rbnNoCobraFlete.Checked)
                {
                    tipoCliente.COBRA_FLETE = false;
                }

                tipoCliente.CODIGO = intCodigotipo;
                tipoCliente.NOMBRE = txtTipoCliente.Text.ToUpper();
                strResultado       = Convert.ToString(servicioGeneral.insTipoCliente(tipoCliente));
                if (Information.IsNumeric(strResultado))
                {
                    llenaGrilla();
                    limpiaCampos();
                    if (Convert.ToInt32(strResultado) == 1)
                    {
                        MessageBox.Show("Registro creado exitosamente", "Registro", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }
                    else if (Convert.ToInt32(strResultado) == 2)
                    {
                        MessageBox.Show("Registro Actualizado exitosamente", "Actualización", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }
                }
                else
                {
                    MessageBox.Show(strResultado, "Error al grabar en BD", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                }
            }
        }
Example #29
0
        private void btnGrabar_Click(object sender, EventArgs e)
        {
            if (validaCampos())
            {
                string strResultado;
                ResponsableTerritorio responsableTerritorio = new ResponsableTerritorio();
                ServicioGeneralClient servicioGeneral       = new ServicioGeneralClient();
                if (rbnActivo.Checked)
                {
                    responsableTerritorio.ESTADO = true;
                }
                else if (rbnInactivo.Checked)
                {
                    responsableTerritorio.ESTADO = false;
                }
                responsableTerritorio.BARRIO           = txtBarrio.Text.ToUpper();
                responsableTerritorio.COD_CIU          = Convert.ToInt32(cboCiudad.SelectedValue);
                responsableTerritorio.COD_CLR          = Convert.ToInt32(cboClaseResponsable.SelectedValue);
                responsableTerritorio.DIRECCION        = txtDireccion.Text.ToUpper();
                responsableTerritorio.EMAIL            = txtEmail.Text.ToLower();
                responsableTerritorio.IDENTIFICACION   = txtIdentificacion.Text.ToUpper();
                responsableTerritorio.NOMBRE_PILA      = txtNombrePila.Text.ToUpper();
                responsableTerritorio.CODIGO           = intCodigoResponsable;
                responsableTerritorio.NOMBRE           = txtNombreResponsable.Text.ToUpper();
                responsableTerritorio.TELEFONO_CELULAR = txtTelefonoCelular.Text.ToUpper();
                responsableTerritorio.TELEFONO_FIJO    = txtTelefonoFijo.Text.ToUpper();
                strResultado = Convert.ToString(servicioGeneral.insResponsableTerritorio(responsableTerritorio));

                if (Information.IsNumeric(strResultado))
                {
                    llenaGrilla();
                    limpiaCampos();
                    if (Convert.ToInt32(strResultado) == 1)
                    {
                        MessageBox.Show("Registro creado exitosamente", "Registro", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }
                    else if (Convert.ToInt32(strResultado) == 2)
                    {
                        MessageBox.Show("Registro Actualizado exitosamente", "Actualización", MessageBoxButtons.OK, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1);
                    }
                }
                else
                {
                    MessageBox.Show("Error al grabar en la Base de Datos, contacte al Administrador del Sistema", "Error BD", MessageBoxButtons.OK, MessageBoxIcon.Error, MessageBoxDefaultButton.Button1);
                }
            }
        }
Example #30
0
 private void cargaSecciones()
 {
     if (cboZona.SelectedIndex > 0)
     {
         ServicioGeneralClient servicioGeneral = new ServicioGeneralClient();
         var withBlock = cboSeccion;
         withBlock.DataSource    = servicioGeneral.getSecciones(1, Convert.ToString(cboZona.SelectedValue), String.Empty);
         withBlock.ValueMember   = "CODIGO";
         withBlock.DisplayMember = "NOMBRE";
         withBlock.SelectedIndex = 0;
     }
     else
     {
         var withBlock = cboSeccion;
         withBlock.DataSource = null;
     }
 }