private void frmCambiarCaja_Load(object sender, EventArgs e) { CajasImplement oCajasImplement = new CajasImplement(); cobranzas oCobranza = new cobranzas(); CobranzasImplement oCobranzasImplement = new CobranzasImplement(); oCobranza = oCobranzasImplement.GetByIdFactura(_idFactura); _caja = oCobranza.id_caja.ToString(); txtCajaActual.Text = _caja; txtCajaActualDescripcion.Text = oCajasImplement.Get(int.Parse(_caja)).caja; CargarCajasActivas(); }
private void btnCambiar_Click(object sender, EventArgs e) { FacturasImplement oFacturasImplement = new FacturasImplement(); cobranzas oCobranza = new cobranzas(); CobranzasImplement oCobranzasImplement = new CobranzasImplement(); if (oFacturasImplement.ExisteCobranza(_idFactura)) { oCobranza = oCobranzasImplement.GetByIdFactura(_idFactura); if (oCobranza != null) { oCobranza.id_caja = int.Parse(cmbCajaNueva.SelectedValue.ToString()); oCobranzasImplement.Update(oCobranza); this.Close(); } } }
private void GuardarCobranza() { facturas oFacturas = new facturas(); socios oSocio = new socios(); SocioImplement oSocioImplement = new SocioImplement(); FacturasImplement oFacturasImplement = new FacturasImplement(); PeriodosImplement oPeriodosImplement = new PeriodosImplement(); FacturasDetallesImplement oFacturasDetallesImplement = new FacturasDetallesImplement(); oFacturas = oFacturasImplement.Get(int.Parse(txtNroFactura.Text)); oFacturas.id_estadoPago = 3; oFacturasImplement.Update(oFacturas); cobranzas oCobranza = new cobranzas(); oCobranza.id_caja = int.Parse(cmbCaja.SelectedValue.ToString()); oCobranza.id_factura = _idFactura; oCobranza.id_recibo = 0; oCobranza.id_socio = _idSocio; oCobranza.importe = decimal.Parse(txtTotalCobrado.Text); oCobranza.descuento_convenio = 0; oCobranza.iva_descuento_convenio = 0; oCobranza.fecha_cobro = dtpFechaCaja.Value; oCobranza.id_terminal = 0;//VER oCobranza.fecha_registro = DateTime.Now; CobranzasImplement oCobranzasImplement = new CobranzasImplement(); oCobranzasImplement.Save(oCobranza); }
/// <summary> /// Create a new cobranzas object. /// </summary> /// <param name="id_cobranza">Initial value of the id_cobranza property.</param> /// <param name="importe">Initial value of the importe property.</param> /// <param name="fecha_registro">Initial value of the fecha_registro property.</param> public static cobranzas Createcobranzas(global::System.Int32 id_cobranza, global::System.Decimal importe, global::System.DateTime fecha_registro) { cobranzas cobranzas = new cobranzas(); cobranzas.id_cobranza = id_cobranza; cobranzas.importe = importe; cobranzas.fecha_registro = fecha_registro; return cobranzas; }
/// <summary> /// Deprecated Method for adding a new object to the cobranzas EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddTocobranzas(cobranzas cobranzas) { base.AddObject("cobranzas", cobranzas); }