コード例 #1
0
ファイル: FrmPuntoVenta3.cs プロジェクト: slotcore/ssf-net
        private void CboTipDocumento_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (booAgregando == true)
            {
                return;
            }

            LblTipDocumento.Text = CboTipDocumento.Text;

            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
            {
                TxtNumRuc.ReadOnly = false;
                TxtNumRuc.Focus();
            }
            else
            {
                TxtNumRuc.ReadOnly = true;
                TxtNomCli.Focus();
            }

            LimpiarControles();

            objNumeroDoc.mysConec = mysConec;
            LblNumDoc.Text        = objNumeroDoc.HallaNumeroDocumento(STU_SISTEMA.EMPRESAID, Convert.ToInt32(CboTipDocumento.SelectedValue), LblSerDoc.Text, Constantes.SYS_DOCNUM.NO_GRABAR_NUMERO_GENERADO);
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
            {
                TxtNumRuc.Focus();
            }
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)
            {
                TxtNomCli.Focus();
            }
        }
コード例 #2
0
        private void TooNuevo_Click(object sender, EventArgs e)
        {
            LimpiarControles();

            LblNumDoc.Text = objTipDoc.UltimoNumero(STU_SISTEMA.EMPRESAID, Convert.ToInt32(CboTipDocumento.SelectedValue), LblSerDoc.Text);
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
            {
                TxtNumRuc.Focus();
            }
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)
            {
                TxtNomCli.Focus();
            }
        }
コード例 #3
0
ファイル: FrmPuntoVenta.cs プロジェクト: slotcore/ssf-net
        private void TooNuevo_Click(object sender, EventArgs e)
        {
            LimpiarControles();

            objNumeroDoc.mysConec = mysConec;
            LblNumDoc.Text        = objNumeroDoc.HallaNumeroDocumento(STU_SISTEMA.EMPRESAID, Convert.ToInt32(CboTipDocumento.SelectedValue), LblSerDoc.Text, Constantes.SYS_DOCNUM.NO_GRABAR_NUMERO_GENERADO);
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
            {
                TxtNumRuc.Focus();
            }
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)
            {
                TxtNomCli.Focus();
            }
        }
コード例 #4
0
ファイル: FrmPuntoVenta.cs プロジェクト: slotcore/ssf-net
        private void CboTipDocumento_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (booAgregando == true)
            {
                return;
            }

            LblTipDocumento.Text = CboTipDocumento.Text;

            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
            {
                TxtNumRuc.ReadOnly = false;
                TxtNumRuc.Focus();
            }
            else
            {
                TxtNumRuc.ReadOnly = true;
                TxtNomCli.Focus();
            }
        }
コード例 #5
0
        void GrabarVenta()
        {
            if (Convert.ToDouble(funFunciones.NulosN(LblTotal.Text)) == 0)                              // SI EL TOTAL DEL DOCUMENTO ES 0
            {
                funFunciones.MensajeMostrarError("El valor del documento no puede ser 0", strTituloFormulario);
                return;
            }

            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)                // SI EL TIPO DE DOCUMENTO ES FACTURA
            {
                if (funFunciones.NulosC(TxtNumRuc.Text) == "")
                {
                    funFunciones.MensajeMostrarError("No ha indicado el numero de ruc para este documento", strTituloFormulario);
                    return;
                }
            }
            if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)                // SI EL TIPO DE DOCUMENTO ES BOLETA
            {
                if (funFunciones.NulosC(TxtNomCli.Text) == "")
                {
                    funFunciones.MensajeMostrarError("No ha indicado el nombre del cliente para este documento", strTituloFormulario);
                    return;
                }
            }

            if (Grabar() == true)
            {
                funFunciones.MensajeMostrarAviso("El documento se guardo con exito", strTituloFormulario);
                LimpiarControles();
                LblNumDoc.Text = objTipDoc.UltimoNumero(STU_SISTEMA.EMPRESAID, Convert.ToInt32(CboTipDocumento.SelectedValue), LblSerDoc.Text);
                if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
                {
                    TxtNumRuc.Focus();
                }
                if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)
                {
                    TxtNomCli.Focus();
                }
            }
        }
コード例 #6
0
        private void FrmPuntoVenta_KeyUp(object sender, KeyEventArgs e)
        {
            if (e.KeyCode.ToString() == "F1")
            {
                MostrarAyuda();
            }
            if (e.KeyCode.ToString() == "F2")
            {
                GrabarVenta();
            }
            if (e.KeyCode.ToString() == "F3")
            {
                LimpiarControles();
                LblNumDoc.Text = objTipDoc.UltimoNumero(STU_SISTEMA.EMPRESAID, Convert.ToInt32(CboTipDocumento.SelectedValue), LblSerDoc.Text);
                if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 2)
                {
                    TxtNumRuc.Focus();
                }
                if (Convert.ToInt32(CboTipDocumento.SelectedValue) == 4)
                {
                    TxtNomCli.Focus();
                }
            }
            if (e.KeyCode.ToString() == "F4")
            {
                AgregarRuc();
            }
            if (e.KeyCode.ToString() == "F5")
            {
                BuscarCLientes();
            }
            if (e.KeyCode.ToString() == "F6")
            {
                int n_num = 0;

                n_num = Convert.ToInt32(CboTipDocumento.Items.Count);
                if (Convert.ToInt32(CboTipDocumento.SelectedIndex) < n_num - 1)
                {
                    CboTipDocumento.SelectedIndex = CboTipDocumento.SelectedIndex + 1;
                }
                else
                {
                    CboTipDocumento.SelectedIndex = 0;
                }
            }
            if (e.KeyCode.ToString() == "F7")
            {
                if (OptForPag1.Checked == true)
                {
                    OptForPag2.Checked = true; OptTarCre1.Checked = true; return;
                }
                if (OptForPag2.Checked == true)
                {
                    OptForPag1.Checked = true; return;
                }
            }
            if (e.KeyCode.ToString() == "F8")
            {
                if (OptTarCre1.Checked == true)
                {
                    OptTarCre2.Checked = true; return;
                }
                if (OptTarCre2.Checked == true)
                {
                    OptTarCre3.Checked = true; return;
                }
                if (OptTarCre3.Checked == true)
                {
                    OptTarCre1.Checked = true; return;
                }
            }
            if (e.KeyCode.ToString() == "F8")
            {
                this.Close();
            }
        }