예제 #1
0
        private void btnAddFile_Click(object sender, EventArgs e)
        {
            ContenedorControl frmContenedor = new ContenedorControl("Agregar archivo...", new CargaImgMarcaLinea(this.IdPAraObjeto, true));

            frmContenedor.ShowDialog();
            frmContenedor.Dispose();
        }
예제 #2
0
파일: Cobro.cs 프로젝트: moisesiq/aupaga
        private void btnEditarNotasDeCredito_Click(object sender, EventArgs e)
        {
            if (this.ctlNotasDeCredito == null)
            {
                this.ctlNotasDeCredito = new SeleccionarNotasDeCredito(this.ClienteID, this.VentaID);
                this.frmNotasDeCredito = new ContenedorControl("Vales", this.ctlNotasDeCredito);
            }

            this.frmNotasDeCredito.ShowDialog(Principal.Instance);
            if (this.frmNotasDeCredito.DialogResult == DialogResult.OK)
            {
                // Si se agregaron notas de otros clientes, se requerirá autorización
                if (this.ctlNotasDeCredito.HayNotasDeOtrosClientes)
                {
                    this.ctlAdvertencia.PonerError(this.txtNotaDeCredito,
                                                   "Uno o más Vales no pertenecen al Cliente seleccionado. Se requerirá autorización para continuar.", ErrorIconAlignment.MiddleLeft);
                }
                // Se agregan las notas de crédito al texto
                this.NotasDeCredito = this.ctlNotasDeCredito.GenerarNotasDeCredito();
                this.txtNotaDeCredito.Clear();
                foreach (var oNota in this.NotasDeCredito)
                {
                    this.txtNotaDeCredito.Text += (", " + oNota.Key.ToString());
                }
                this.txtNotaDeCredito.Text = (this.txtNotaDeCredito.Text == "" ? "" : this.txtNotaDeCredito.Text.Substring(2));

                this.CalcularTotales();
            }
        }
예제 #3
0
파일: Cobro.cs 프로젝트: moisesiq/aupaga
        private void HabilitarTextosFP()
        {
            this.txtEfectivo.Enabled             = this.chkEfectivo.Checked;
            this.txtCheque.Enabled               = this.chkCheque.Checked;
            this.txtTarjetaDeCredito.Enabled     = (this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked);
            this.txtTransferencia.Enabled        = this.chkTransferencia.Checked;
            this.cmbBanco.Enabled                = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtFolio.Enabled                = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtCuenta.Enabled               = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtNoIdentificado.Enabled       = this.chkNoIdentificado.Checked;
            this.txtNotaDeCredito.Enabled        = this.chkNotaDeCredito.Checked;
            this.btnEditarNotasDeCredito.Enabled = this.chkNotaDeCredito.Checked;

            if (!this.chkEfectivo.Checked)
            {
                this.txtEfectivo.Clear();
            }
            if (!this.chkCheque.Checked)
            {
                this.txtCheque.Clear();
            }
            if (!this.chkTarjetaDeCredito.Checked && !this.chkTarjetaDeDebito.Checked)
            {
                this.txtTarjetaDeCredito.Clear();
            }
            if (!this.chkTransferencia.Checked)
            {
                this.txtTransferencia.Clear();
            }
            if (!this.chkCheque.Checked && !this.chkTarjetaDeCredito.Checked && !this.chkTarjetaDeDebito.Checked && !this.chkTransferencia.Checked)
            {
                this.cmbBanco.SelectedIndex = -1;
                this.txtFolio.Clear();
                this.txtCuenta.Clear();
            }
            if (!this.chkNoIdentificado.Checked)
            {
                this.txtNoIdentificado.Clear();
            }
            if (!this.chkNotaDeCredito.Checked)
            {
                this.txtNotaDeCredito.Clear();
                this.NotasDeCredito.Clear();
                if (this.ctlNotasDeCredito != null)
                {
                    this.ctlNotasDeCredito.Dispose();
                    this.ctlNotasDeCredito = null;
                }
                if (this.frmNotasDeCredito != null)
                {
                    this.frmNotasDeCredito.Dispose();
                    this.frmNotasDeCredito = null;
                }
            }
        }
예제 #4
0
        private void btnEgresoEditar_Click(object sender, EventArgs e)
        {
            if (this.dgvGastos.CurrentRow == null)
            {
                return;
            }
            int iContaEgresoID = Util.Entero(this.dgvGastos.CurrentRow.Cells["Gastos_ContaEgresoID"].Value);
            var frmEgreso      = new ContenedorControl("Gasto Contable", new GastoContable(iContaEgresoID));

            if (frmEgreso.ShowDialog(Principal.Instance) == DialogResult.OK)
            {
                this.LlenarCuentasTotales();
                int iCuentaID = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value);
                this.LlenarMovimientosCuenta(iCuentaID);
            }
            frmEgreso.Dispose();
        }
예제 #5
0
        private void btnGastoAgregar_Click(object sender, EventArgs e)
        {
            // Se pre-selecciona la cuenta según la posición en el Grid
            var oGasto = new GastoContable();

            if (this.tgvCuentas.CurrentNode != null && this.tgvCuentas.CurrentNode.Level == 4)
            {
                int iId = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value);
                oGasto.Load += new EventHandler((s, ea) =>
                {
                    oGasto.SeleccionarCuentaFinal(iId);
                });
            }

            var frmCont = new ContenedorControl("Agregar Gasto", oGasto);

            frmCont.FormBorderStyle = FormBorderStyle.Sizable;
            if (frmCont.ShowDialog(Principal.Instance) == DialogResult.OK)
            {
                this.LlenarCuentasTotales();
            }
            frmCont.Dispose();
        }
예제 #6
0
 private void btnAddFile_Click(object sender, EventArgs e)
 {
     ContenedorControl frmContenedor = new ContenedorControl("Agregar archivo...", new CargaImgMarcaLinea(this.IdPAraObjeto, true));
     frmContenedor.ShowDialog();
     frmContenedor.Dispose();
 }
예제 #7
0
파일: Cobro.cs 프로젝트: moisesiq/aupaga
        private void HabilitarTextosFP()
        {
            this.txtEfectivo.Enabled = this.chkEfectivo.Checked;
            this.txtCheque.Enabled = this.chkCheque.Checked;
            this.txtTarjetaDeCredito.Enabled = (this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked);
            this.txtTransferencia.Enabled = this.chkTransferencia.Checked;
            this.cmbBanco.Enabled = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtFolio.Enabled = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtCuenta.Enabled = (this.chkCheque.Checked || this.chkTarjetaDeCredito.Checked || this.chkTarjetaDeDebito.Checked || this.chkTransferencia.Checked);
            this.txtNoIdentificado.Enabled = this.chkNoIdentificado.Checked;
            this.txtNotaDeCredito.Enabled = this.chkNotaDeCredito.Checked;
            this.btnEditarNotasDeCredito.Enabled = this.chkNotaDeCredito.Checked;

            if (!this.chkEfectivo.Checked) this.txtEfectivo.Clear();
            if (!this.chkCheque.Checked) this.txtCheque.Clear();
            if (!this.chkTarjetaDeCredito.Checked && !this.chkTarjetaDeDebito.Checked) this.txtTarjetaDeCredito.Clear();
            if (!this.chkTransferencia.Checked) this.txtTransferencia.Clear();
            if (!this.chkCheque.Checked && !this.chkTarjetaDeCredito.Checked && !this.chkTarjetaDeDebito.Checked && !this.chkTransferencia.Checked)
            {
                this.cmbBanco.SelectedIndex = -1;
                this.txtFolio.Clear();
                this.txtCuenta.Clear();
            }
            if (!this.chkNoIdentificado.Checked) this.txtNoIdentificado.Clear();
            if (!this.chkNotaDeCredito.Checked)
            {
                this.txtNotaDeCredito.Clear();
                this.NotasDeCredito.Clear();
                if (this.ctlNotasDeCredito != null)
                {
                    this.ctlNotasDeCredito.Dispose();
                    this.ctlNotasDeCredito = null;
                }
                if (this.frmNotasDeCredito != null)
                {
                    this.frmNotasDeCredito.Dispose();
                    this.frmNotasDeCredito = null;
                }
            }
        }
예제 #8
0
파일: Cobro.cs 프로젝트: moisesiq/aupaga
        private void btnEditarNotasDeCredito_Click(object sender, EventArgs e)
        {
            if (this.ctlNotasDeCredito == null)
            {
                this.ctlNotasDeCredito = new SeleccionarNotasDeCredito(this.ClienteID, this.VentaID);
                this.frmNotasDeCredito = new ContenedorControl("Vales", this.ctlNotasDeCredito);
            }

            this.frmNotasDeCredito.ShowDialog(Principal.Instance);
            if (this.frmNotasDeCredito.DialogResult == DialogResult.OK)
            {
                // Si se agregaron notas de otros clientes, se requerirá autorización
                if (this.ctlNotasDeCredito.HayNotasDeOtrosClientes)
                    this.ctlAdvertencia.PonerError(this.txtNotaDeCredito,
                        "Uno o más Vales no pertenecen al Cliente seleccionado. Se requerirá autorización para continuar.", ErrorIconAlignment.MiddleLeft);
                // Se agregan las notas de crédito al texto
                this.NotasDeCredito = this.ctlNotasDeCredito.GenerarNotasDeCredito();
                this.txtNotaDeCredito.Clear();
                foreach (var oNota in this.NotasDeCredito)
                    this.txtNotaDeCredito.Text += (", " + oNota.Key.ToString());
                this.txtNotaDeCredito.Text = (this.txtNotaDeCredito.Text == "" ? "" : this.txtNotaDeCredito.Text.Substring(2));

                this.CalcularTotales();
            }
        }
예제 #9
0
        private void btnGastoAgregar_Click(object sender, EventArgs e)
        {
            // Se pre-selecciona la cuenta según la posición en el Grid
            var oGasto = new GastoContable();
            if (this.tgvCuentas.CurrentNode != null && this.tgvCuentas.CurrentNode.Level == 4)
            {
                int iId = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value);
                oGasto.Load += new EventHandler((s, ea) =>
                {
                    oGasto.SeleccionarCuentaFinal(iId);
                });
            }

            var frmCont = new ContenedorControl("Agregar Gasto", oGasto);
            frmCont.FormBorderStyle = FormBorderStyle.Sizable;
            if (frmCont.ShowDialog(Principal.Instance) == DialogResult.OK)
                this.LlenarCuentasTotales();
            frmCont.Dispose();
        }
예제 #10
0
 private void btnEgresoEditar_Click(object sender, EventArgs e)
 {
     if (this.dgvGastos.CurrentRow == null) return;
     int iContaEgresoID = Util.Entero(this.dgvGastos.CurrentRow.Cells["Gastos_ContaEgresoID"].Value);
     var frmEgreso = new ContenedorControl("Gasto Contable", new GastoContable(iContaEgresoID));
     if (frmEgreso.ShowDialog(Principal.Instance) == DialogResult.OK)
     {
         this.LlenarCuentasTotales();
         int iCuentaID = Util.Entero(this.tgvCuentas.CurrentNode.Cells["Cuentas_Id"].Value);
         this.LlenarMovimientosCuenta(iCuentaID);
     }
     frmEgreso.Dispose();
 }
예제 #11
0
파일: Ventas.cs 프로젝트: moisesiq/aupaga
        private void btnEditarCliente_Click(object sender, EventArgs e)
        {
            if (this.Cliente == null) return;

            // Se valida que el cliente no sea "Ventas Mostrador"
            if (this.Cliente.ClienteID == Cat.Clientes.Mostrador)
            {
                UtilLocal.MensajeAdvertencia("El cliente especificado no se puede editar.");
                return;
            }

            var ctlClientes = new clientes();
            ctlClientes.ModificaCredito = false;
            ctlClientes.ModificaCaracteristicas = false;
            ctlClientes.VieneDeVentas = true;
            ContenedorControl frmCliente = new ContenedorControl("Editar Cliente", ctlClientes);
            ctlClientes.CargarCliente(this.Cliente.ClienteID);
            var btnGuardar = (ctlClientes.Controls[0].Controls[0].Controls["btnGuardar"] as Button);
            btnGuardar.Click += new EventHandler((oS, oE) =>
            {
                if (ctlClientes.Guardado)
                    frmCliente.Close();
            });

            frmCliente.ShowDialog(Principal.Instance);
            if (ctlClientes.Guardado)
            {
                this.ActualizarComboClientes();
            }
            frmCliente.Dispose();
        }
예제 #12
0
파일: Ventas.cs 프로젝트: moisesiq/aupaga
        private void btnAgregarCliente_Click(object sender, EventArgs e)
        {
            var ctlClientes = new clientes();
            ctlClientes.ModificaCredito = false;
            ctlClientes.VieneDeVentas = true;
            ContenedorControl frmCliente = new ContenedorControl("Agregar Cliente", ctlClientes);
            ctlClientes.CargarCliente(0);
            var btnGuardar = (ctlClientes.Controls[0].Controls[0].Controls["btnGuardar"] as Button);
            btnGuardar.Click += new EventHandler((oS, oE) => {
                if (ctlClientes.Guardado)
                    frmCliente.Close();
            });

            frmCliente.ShowDialog(Principal.Instance);
            if (ctlClientes.Guardado)
            {
                this.ActualizarComboClientes();
                this.tacCliente.ValorSel = ctlClientes.ClienteID;
            }
            frmCliente.Dispose();
        }
예제 #13
0
파일: Ventas.cs 프로젝트: moisesiq/aupaga
        private void ReporteDeFaltante(int iParteID)
        {
            if (iParteID <= 0)
            {
                UtilLocal.MensajeAdvertencia("No hay ningún Producto seleccionado.");
                return;
            }

            ContenedorControl frmContenedor = new ContenedorControl("Reportar Parte faltante", new ReportarParteFaltante(iParteID), new Size(400 + 6, 280 + 28));
            frmContenedor.ShowDialog();
            frmContenedor.Dispose();
        }