private void cb_afecta_caja_CheckedChanged(object sender, EventArgs e) { if (cb_afecta_caja.Checked) { if (ObjCajaDiaria == null) { cb_afecta_caja.Checked = false; tt_general.Show("Debe abrir una caja para registrar la operacion", pn_abm, cb_afecta_caja.Location.X, cb_afecta_caja.Location.Y - 30, 3000); } else { bs_formas.ResetBindings(false); bs_formas.DataSource = admforma.VerLista(); bs_formas.Remove(admforma.BuscarPorID(2)); List <int> columnas = new List <int>(); columnas.Add(0); columnas.Add(2); columnas.Add(3); columnas.Add(4); columnas.Add(5); Frm_Eleccion frm = new Frm_Eleccion("Forma de pago", "la forma de pago", bs_formas, columnas, ""); frm.ShowDialog(); if (frm.ObjRespuesta == null) { forma = admforma.BuscarPorID(1); } else { forma = (Cforma_pago)frm.ObjRespuesta; } lbl_formaPago.Text = forma.Descripcion; } } lbl_formaPago.Visible = cb_afecta_caja.Checked; }
private void ActualizarFormasPagos() { bs_FormasDePago.ResetBindings(false); bs_FormasDePago.DataSource = admformaspagos.VerLista(); cb_formaPago.DataSource = bs_FormasDePago; cb_formaPago.DisplayMember = "Descripcion"; }
private void Frm_Operacion_Load(object sender, EventArgs e) { Ctrl_formas_pagos admformas = Ctrl_formas_pagos.ClaseActiva(); bs_FormasPagos.ResetBindings(true); bs_FormasPagos.DataSource = admformas.VerLista(); cb_FormasPagos.DataSource = bs_FormasPagos; cb_FormasPagos.DisplayMember = "Descripcion"; cb_FormasPagos.Text = admformas.BuscarPorID(1).Descripcion; ActualizarConceptos(); if (Gasto) { cb_registrar.Text = "Generar debito en cuenta"; Ctrl_proveedores admprove = Ctrl_proveedores.ClaseActiva(); if (admprove.VerLista().Count == 0) { cb_registrar.Visible = false; } if (Ooperacion == null) { this.Text = "Agregar gasto"; } else { this.Text = "Modificar gasto"; cb_concepto.Text = ((Cgasto)Ooperacion).Concepto; txt_importe.Text = Ooperacion.Importe.ToString(); if (Opersona != null) { cb_registrar.Visible = false; lbl_persona.Text = Opersona.Nombre; } } } else { cb_registrar.Text = "Generar recibo en cuenta"; Ctrl_clientes admclien = Ctrl_clientes.ClaseActiva(); if (admclien.VerClientesConCuentas().Count == 0) { cb_registrar.Visible = false; } if (Ooperacion == null) { this.Text = "Agregar Cobro"; } else { this.Text = "Modificar Cobro"; cb_concepto.Text = ((Ccobro)Ooperacion).Concepto; txt_importe.Text = Ooperacion.Importe.ToString(); if (Opersona != null) { cb_registrar.Visible = false; lbl_persona.Text = Opersona.Nombre; } } } }
private void ActualizarGrilla() { bs_pagos.ResetBindings(true); bs_pagos.DataSource = adm.VerLista(); dgrid_FPagos.DataSource = bs_pagos; dgrid_FPagos.Columns[0].Visible = false; }
private void Frm_Formas_pagos_varias_Load(object sender, EventArgs e) { pbtn.Hide(); lbl_Subtotal.Text = Sub; bs_FormasDePago.ResetBindings(false); admformaspagos.CargarLista(); bs_FormasDePago.DataSource = admformaspagos.VerLista(); bs_formasDePago2.DataSource = admformaspagos.VerLista(); cbb_FormaPago1.DataSource = bs_FormasDePago; cbb_FormaPago1.DisplayMember = "Descripcion"; cbb_FormaPago2.DataSource = bs_formasDePago2; cbb_FormaPago2.DisplayMember = "Descripcion"; cbb_FormaPago1.Text = "Contado"; txt_subtotalFP1.Text = Sub; ActualizarCuentas(); CalcularDescuentos(); }