Exemplo n.º 1
0
 private void CargarCuentas()
 {
     try
     {
         cuentas = new List <Cuenta>();
         cuentas = LogicaCuentas.cargarCuentasDisponiblesAsiento(empresa);
         for (int i = 0; i < cuentas.Count; i++)
         {
             cmbCuenta.Items.Add(cuentas[i].Nombre);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Exemplo n.º 2
0
        public AsientosDiario(string Compania)
        {
            this.compania = Compania;
            InitializeComponent();
            this.numAsiento         = LogicaAsientos.obtenerNuevoNumeroAsiento(compania);
            this.txtNumAsiento.Text = this.numAsiento.ToString();

            this.listaCuentas            = LogicaCuentas.cargarCuentasDisponiblesAsiento(compania);
            this.cmbCuenta.DisplayMember = "Nombre";
            this.cmbCuenta.ValueMember   = "ID";
            this.cmbCuenta.SelectedText  = "Nombre";
            this.cmbCuenta.DataSource    = this.listaCuentas;

            this.cuentasAsiento           = new DataTable();//Datatable que se enviará cuando se guarda el asiento
            this.cuentasAsiento.TableName = "@Cuentas";
            this.cuentasAsiento.Columns.Add("IdCuenta", typeof(int));
            this.cuentasAsiento.Columns.Add("Debe", typeof(double));
            this.cuentasAsiento.Columns.Add("Haber", typeof(double));
            this.cuentasAsiento.Columns.Add("Moneda", typeof(string));
        }