Esempio n. 1
0
 public Frm_Operacion(bool gasto, Coperacion cOp, Ccaja_diaria obj, Cpersona oper)
 {
     InitializeComponent();
     Gasto         = gasto;
     Ooperacion    = cOp;
     ObjCajaDiaria = obj;
     Opersona      = oper;
 }
Esempio n. 2
0
 static public void Modificar(string tabla, Coperacion obj, bool alta, string concepto)
 {
     try
     {
         string cmdtxt = "UPDATE " + tabla + " SET alta='" + alta + "' ,concepto = '" + concepto + "',importe=" + (obj.Importe.ToString()).Replace(",", ".") + ",fecha=" + obj.Fecha.ToSqlDate() + " WHERE numero=" + obj.Numero;
         cDatos.ActualizarDatos(cmdtxt);
         Actualizar = true;
     }
     catch
     {
         throw new ArgumentException("Error al modificar la operacion");
     }
 }
Esempio n. 3
0
 static public void Agregar(string tabla, Coperacion obj, Ccuenta_corriente cuenta, string concepto)
 {
     try
     {
         string cmdtxt = "INSERT INTO " + tabla + " (numero,concepto,importe,fecha,id_cuenta_corriente,alta) VALUES (" + obj.Numero + ",'" + concepto + "'," + (obj.Importe.ToString()).Replace(",", ".") + "," + obj.Fecha.ToSqlDate() + "," + cuenta.ID + ",1)";
         cDatos.ActualizarDatos(cmdtxt);
         Actualizar = true;
     }
     catch
     {
         throw new ArgumentException("Error al cargar la operacion");
     }
 }
Esempio n. 4
0
 protected override void btn_Cancelar_Click(object sender, EventArgs e)
 {
     gb_abm.Enabled         = true;
     pn_btnDerechos.Visible = false;
     p_derecho.Visible      = false;
     pn_btnABM.Visible      = true;
     ModoModificacion       = false;
     Frm_cuenta_corriente_Activated(sender, e);
     txt_concepto.Clear();
     txt_importe.Clear();
     txt_importe.Enabled = true;
     objoperacion        = null;
     cb_afecta_caja.Hide();
     dgrid_Creditos.Enabled = true;
     dgrid_Debitos.Enabled  = true;
     LimpiarSeleccionados();
 }
Esempio n. 5
0
 private void btn_Modificar_Click(object sender, EventArgs e)
 {
     if (dgrid_Creditos.SelectedRows.Count == 0)
     {
         Crecibo_debito odebito = (Crecibo_debito)dgrid_Debitos.CurrentRow.DataBoundItem;
         txt_concepto.Text  = odebito.Concepto;
         objoperacion       = odebito;
         rb_credito.Checked = false;
         rb_debito.Checked  = true;
     }
     else
     {
         Cpago_credito ocredito = (Cpago_credito)dgrid_Creditos.CurrentRow.DataBoundItem;
         txt_concepto.Text  = ocredito.Concepto;
         objoperacion       = ocredito;
         rb_debito.Checked  = false;
         rb_credito.Checked = true;
     }
     Expandido();
     cb_afecta_caja_CheckedChanged(sender, e);
     txt_dia.Text     = objoperacion.Fecha.ToShortDateString();
     txt_importe.Text = objoperacion.Importe.ToString();
 }
 public void EliminarRefOperacion(Coperacion obj, string tabla)
 {
     Cdatos_operaciones.EliminarReferenciaDe(tabla, obj);
 }
Esempio n. 7
0
        static public void Eliminar(string tabla, Coperacion obj)
        {
            string cmdtext = "DELETE FROM " + tabla + " WHERE numero=" + obj.Numero;

            cDatos.ActualizarDatos(cmdtext);
        }
Esempio n. 8
0
        static public void EliminarReferenciaDebitosCreditos(string columna, Coperacion obj)
        {
            string cmdtext = "DELETE FROM [DEBITOS-CREDITOS] WHERE " + columna + "=" + obj.Numero;

            cDatos.ActualizarDatos(cmdtext);
        }