private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } int Impago = 0; if (chkImpagos.Checked == true) { Impago = 1; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); int Impagos = 0; if (chkImpagos.Checked == true) { Impagos = 1; } Clases.cChequesaPagar cheque = new Clases.cChequesaPagar(); DataTable trdo = cheque.GetChequesPagar(FechaDesde, FechaHasta, Impago, txtPatente.Text); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); trdo = fun.TablaaMiles(trdo, "Importe"); trdo = fun.TablaaMiles(trdo, "Saldo"); Grilla.DataSource = trdo; Grilla.Columns[1].HeaderText = "Nro de cheque"; Grilla.Columns[6].HeaderText = "Fecha Pago"; Grilla.Columns[9].HeaderText = "Fecha Vto"; Grilla.Columns[5].Width = 130; Grilla.Columns[1].Width = 140; Grilla.Columns[2].Width = 150; Grilla.Columns[3].Width = 100; Grilla.Columns[6].Width = 110; Grilla.Columns[7].Width = 180; Grilla.Columns[7].HeaderText = "Descripción"; Grilla.Columns[0].Visible = false; }
private void CargarGrilla() { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } int soloImpago = 0; if (chkImpagos.Checked) { soloImpago = 1; } string Nombre = txtNombre.Text; Clases.cPrestamo prestamo = new Clases.cPrestamo(); DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); DataTable tb = prestamo.GetPrestamosxFecha(FechaDesde, FechaHasta, Nombre, soloImpago); tb = fun.TablaaMiles(tb, "Importe"); tb = fun.TablaaMiles(tb, "ImporteaPagar"); txtTotal.Text = fun.TotalizarColumna(tb, "Importe").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } Grilla.DataSource = tb; Grilla.Columns[1].Width = 290; Grilla.Columns[2].Width = 170; Grilla.Columns[5].HeaderText = "Fecha"; Grilla.Columns[5].Width = 100; Grilla.Columns[7].HeaderText = "Importe a pagar"; Grilla.Columns[7].Width = 140; Grilla.Columns[8].HeaderText = "Fecha Pago"; Grilla.Columns[8].Width = 130; Grilla.Columns[0].Visible = false; Grilla.Columns[4].Visible = false; }
private void CargarPlandeCuotas(Int32 CodVenta) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cCuota cuota = new Clases.cCuota(); DataTable trdo = cuota.GetCuotasxCodVenta(CodVenta); trdo = fun.TablaaMiles(trdo, "Importe"); trdo = fun.TablaaMiles(trdo, "ImportePagado"); trdo = fun.TablaaMiles(trdo, "Saldo"); GrillaCuotas.DataSource = trdo; }
private void btnBuscar_Click(object sender, EventArgs e) { //arreglar que no graba el cod cliente en cobranza //en eo form de venta Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); Int32 SoloImpago = 0; if (chkImpago.Checked == true) { SoloImpago = 1; } Clases.cCobranza cob = new Clases.cCobranza(); DataTable trdo = cob.GetCobranzaxFecha(FechaDesde, FechaHasta, txtPatente.Text, txtApellido.Text, SoloImpago); trdo = fun.TablaaMiles(trdo, "Saldo"); txtTotal.Text = fun.TotalizarColumna(trdo, "Saldo").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[4].HeaderText = "Fecha Pago"; Grilla.Columns[6].HeaderText = "Fecha Comp."; Grilla.Columns[1].Width = 150; Grilla.Columns[2].Width = 200; Grilla.Columns[4].Width = 120; Grilla.Columns[5].Width = 120; Grilla.Columns[6].Width = 158; }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } int Impagos = 0; if (chkImpagos.Checked == true) { Impagos = 1; } Clases.cPrenda prenda = new Clases.cPrenda(); DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); DataTable trdo = prenda.GetPrendasxFecha(FechaDesde, FechaHasta, Impagos, txtPatente.Text, txtApellido.Text); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } trdo = fun.TablaaMiles(trdo, "Importe"); trdo = fun.TablaaMiles(trdo, "ImportePagado"); trdo = fun.TablaaMiles(trdo, "Diferencia"); Grilla.DataSource = trdo; Grilla.Columns[1].HeaderText = "Descripción"; Grilla.Columns[1].Width = 150; Grilla.Columns[2].Width = 350; Grilla.Columns[5].HeaderText = "Fecha Pago"; Grilla.Columns[5].Width = 140; Grilla.Columns[6].Visible = false; Grilla.Columns[7].HeaderText = "Pagado"; Grilla.Columns[8].HeaderText = "Diferencia"; }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); int SoloImpago = 0; if (chkSoloImpagos.Checked) { SoloImpago = 1; } cCobranzaGeneral cob = new cCobranzaGeneral(); DataTable trdo = cob.GetCobranzasGeneralesxFecha(FechaDesde, FechaHasta, SoloImpago, txtConcepto.Text, txtCliente.Text); txtTotal.Text = fun.TotalizarColumna(trdo, "Saldo").ToString(); trdo = fun.TablaaMiles(trdo, "Importe"); trdo = fun.TablaaMiles(trdo, "ImportePagado"); trdo = fun.TablaaMiles(trdo, "Saldo"); Grilla.DataSource = trdo; Grilla.Columns[4].HeaderText = "Importe Pagado"; Grilla.Columns[5].HeaderText = "Fecha Pago"; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Width = 240; Grilla.Columns[4].Width = 140; Grilla.Columns[5].Width = 120; Grilla.Columns[7].Width = 120; if (txtTotal.Text != "" && txtTotal.Text != "0") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } int Impagos = 0; if (chkImpagos.Checked == true) { Impagos = 1; } Clases.cPrenda prenda = new Clases.cPrenda(); DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); Clases.cEfectivoaPagar obj = new Clases.cEfectivoaPagar(); DataTable trdo = obj.GetEfectivosaPagarxFecha(FechaDesde, FechaHasta, txtPatente.Text.Trim(), Impagos); trdo = fun.TablaaMiles(trdo, "Saldo"); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = true; Grilla.Columns[5].Width = 150; Grilla.Columns[6].Width = 150; Grilla.Columns[7].Width = 240; txtTotal.Text = fun.TotalizarColumna(trdo, "Saldo").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } }
private void BuscarCheques(Int32 CodPrenda) { Clases.cCheque cheque = new Clases.cCheque(); DataTable trdo = cheque.GetChequexCodPrenda(CodPrenda); Clases.cFunciones fun = new Clases.cFunciones(); trdo = fun.TablaaMiles(trdo, "Importe"); GrillaCheques.DataSource = trdo; GrillaCheques.Columns[0].HeaderText = "Cheque"; GrillaCheques.Columns[2].HeaderText = "Vencimiento"; GrillaCheques.Columns[3].Visible = false; GrillaCheques.Columns[4].Width = 310; GrillaCheques.Columns[1].Width = 100; txtImporteCheque.Text = ""; txtCheque.Text = ""; txtFechaVencimiento.Text = ""; double TotalCheques = 0; for (int i = 0; i < trdo.Rows.Count; i++) { TotalCheques = TotalCheques + Convert.ToDouble(trdo.Rows[i][1].ToString()); } txtTotalCheque.Text = TotalCheques.ToString(); //Clases.cFunciones fun = new Clases.cFunciones(); txtTotalCheque.Text = fun.ParteEntera(txtTotalCheque.Text); txtTotalCheque.Text = fun.FormatoEnteroMiles(txtTotalCheque.Text); CalcularDiferencias(); }
private void BuscarAutosdeStock(string Patente, Int32?CodMarca) { double Total = 0; Clases.cFunciones fun = new Clases.cFunciones(); Clases.cStockAuto stock = new Clases.cStockAuto(); DataTable trdo = stock.GetStockDetalladosVigente(Patente, CodMarca); trdo = fun.TablaaMiles(trdo, "Costo"); Total = fun.TotalizarColumna(trdo, "Costo"); txtTotalVehiculos.Text = trdo.Rows.Count.ToString(); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[2].Width = 195; Grilla.Columns[3].Width = 280; Grilla.Columns[4].Width = 90; Grilla.Columns[5].Width = 200; Grilla.Columns[4].HeaderText = "Fecha"; Grilla.Columns[5].HeaderText = "Ex Titular"; Grilla.Columns[7].HeaderText = "Concesión"; txtMontoTotal.Text = Total.ToString(); if (txtMontoTotal.Text != "") { txtMontoTotal.Text = fun.SepararDecimales(txtMontoTotal.Text); txtMontoTotal.Text = fun.FormatoEnteroMiles(txtMontoTotal.Text); } }
private void CargarGrilla() { Clases.cFunciones fun = new Clases.cFunciones(); string Patente = txtPatente.Text; Clases.cCheque cheque = new Clases.cCheque(); DataTable trdo = cheque.GetChequesxPatente(Patente); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; if (trdo.Rows.Count > 0) { txtNombre.Text = trdo.Rows[0]["Nombre"].ToString(); txtApellido.Text = trdo.Rows[0]["Apellido"].ToString(); txtDescripcion.Text = trdo.Rows[0]["Descripcion"].ToString(); } Grilla.Columns[1].HeaderText = "Nro Cheque"; Grilla.Columns[3].HeaderText = "Fecha Pago"; Grilla.Columns[4].HeaderText = "Fecha Vto"; Grilla.Columns[1].Width = 150; Grilla.Columns[2].Width = 150; Grilla.Columns[3].Width = 120; Grilla.Columns[4].Width = 120; Grilla.Columns[0].Visible = false; Grilla.Columns[5].Visible = false; Grilla.Columns[6].Visible = false; Grilla.Columns[7].Visible = false; }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); Clases.cGastosNegocio gasto = new Clases.cGastosNegocio(); DataTable trdo = gasto.GetGastosNegocioxFecha(FechaDesde, FechaHasta, txtDescripcion.Text); trdo = fun.TablaaMiles(trdo, "Importe"); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[2].Width = 523; }
private void Buscar() { if (fun.ValidarFecha(txtFechaDesde.Text) == false) { Mensaje("La fecha desde es incorrecta"); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { Mensaje("La fecha desde es incorrecta"); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); if (FechaDesde > FechaHasta) { Mensaje("La fecha desde es superior a la fecha hasta "); return; } Clases.cAnotacion obj = new Clases.cAnotacion(); DataTable trdo = obj.GetAnotacionesxFecha(FechaDesde, FechaHasta, txtConcepto.Text.Trim()); double TotalIngreso = fun.TotalizarColumna(trdo, "ImporteIngreso"); double TotalEgreso = fun.TotalizarColumna(trdo, "ImporteEgreso"); trdo = fun.TablaaMiles(trdo, "ImporteIngreso"); trdo = fun.TablaaMiles(trdo, "ImporteEgreso"); Grilla.DataSource = trdo; double dif = TotalIngreso - TotalEgreso; txtTotal.Text = dif.ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } Grilla.Columns[1].HeaderText = "Descripción"; Grilla.Columns[3].HeaderText = "Ingreso"; Grilla.Columns[4].HeaderText = "Egreso"; Grilla.Columns[1].Width = 500; Grilla.Columns[3].Width = 100; Grilla.Columns[4].Width = 103; Grilla.Columns[0].Visible = false; }
private void CargarDetalle(Int32 CodPrestamo) { Clases.cDetallePrestamo detalle = new Clases.cDetallePrestamo(); DataTable trdo = detalle.GetDetallePrestamo(CodPrestamo); Clases.cFunciones fun = new Clases.cFunciones(); trdo = fun.TablaaMiles(trdo, "Importe"); GrillaDetallePrestamo.DataSource = trdo; }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); int Impagos = 0; Int32? CodBanco = null; string NroCheque = ""; if (cmbBanco.SelectedIndex > 0) { CodBanco = Convert.ToInt32(cmbBanco.SelectedValue); } NroCheque = txtNumeroCheque.Text; if (chkImpagos.Checked == true) { Impagos = 1; } Clases.cCheque cheque = new Clases.cCheque(); DataTable trdo = cheque.GetChequesxFecha(FechaDesde, FechaHasta, Impagos, CodBanco, NroCheque); trdo = fun.TablaaMiles(trdo, "Importe"); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } Grilla.DataSource = trdo; Grilla.Columns[1].Width = 100; Grilla.Columns[1].HeaderText = "Fec. Cobro"; Grilla.Columns[2].Width = 100; Grilla.Columns[2].HeaderText = "Fecha Vto."; Grilla.Columns[3].Width = 140; Grilla.Columns[3].HeaderText = "Nro. Cheque"; Grilla.Columns[5].Width = 220; Grilla.Columns[6].Visible = false; }
private void CargarGrilla() { Clases.cGasto gasto = new Clases.cGasto(); DataTable tresul = gasto.GetGastosxCodStock(Convert.ToInt32(txtCodStock.Text)); Clases.cFunciones fun = new Clases.cFunciones(); tresul = fun.TablaaMiles(tresul, "Importe"); Grilla.DataSource = tresul; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Width = 480; }
private void FrmSaldoCuotas_Load(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cSaldoCuota saldo = new Clases.cSaldoCuota(); DataTable trdo = saldo.GetSaldoCobranza(Convert.ToInt32(Principal.CodigoPrincipalAbm)); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; }
private void Cargar(Int32 CodCheque) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cChequesaPagar cheque = new Clases.cChequesaPagar(); DataTable trdo = cheque.GetChequesPagarxCodigo(CodCheque); if (trdo.Rows.Count > 0) { txtNroCheque.Text = trdo.Rows[0]["NroCheque"].ToString(); txtImporte.Text = trdo.Rows[0]["Importe"].ToString(); txtCliente.Text = trdo.Rows[0]["Nombre"].ToString(); txtCliente.Text = txtCliente.Text + " " + trdo.Rows[0]["Apellido"].ToString(); txtPatente.Text = trdo.Rows[0]["Patente"].ToString(); txtSaldo.Text = trdo.Rows[0]["Saldo"].ToString(); if (trdo.Rows[0]["FechaPago"].ToString() != "") { DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["FechaPago"].ToString()); txtFecha.Text = Fecha.ToShortDateString(); } if (trdo.Rows[0]["FechaVencimiento"].ToString() != "") { DateTime Fecha = Convert.ToDateTime(trdo.Rows[0]["FechaVencimiento"].ToString()); txtFechaVto.Text = Fecha.ToShortDateString(); } if (txtSaldo.Text != "") { txtSaldo.Text = fun.SepararDecimales(txtSaldo.Text); txtSaldo.Text = fun.FormatoEnteroMiles(txtSaldo.Text); } if (txtImporte.Text != "") { txtImporte.Text = fun.SepararDecimales(txtImporte.Text); txtImporte.Text = fun.FormatoEnteroMiles(txtImporte.Text); } if (txtSaldo.Text == "0") { btnGrabar.Enabled = false; } } Clases.cPagoCheque pago = new Clases.cPagoCheque(); DataTable tresul = pago.GetPagosCheques(CodCheque); tresul = fun.TablaaMiles(tresul, "Importe"); Grilla.DataSource = tresul; // Grilla.Columns[0].Visible = false; // Grilla.Columns[1].Visible = false; Grilla.Columns[2].Width = 280; }
private void CargarGrillaxPatente(string Patente) { //GetDetalleCobranzaxCod este debo usar Clases.cCobranza cob = new Clases.cCobranza(); Clases.cFunciones fun = new Clases.cFunciones(); DataTable trdo = cob.GetDetalleCobranzaxPatente(Patente); trdo = fun.TablaaMiles(trdo, "Importe"); trdo = fun.TablaaMiles(trdo, "ImportePagado"); trdo = fun.TablaaMiles(trdo, "Punitorio"); trdo = fun.TablaaMiles(trdo, "Saldo"); Grilla.DataSource = trdo; int ban = 0; if (trdo.Rows.Count > 0) { txtCuota.Text = trdo.Rows[0]["Cuota"].ToString(); if (trdo.Rows[0]["CodVenta"].ToString() != "") { ban = 1; txtNombre.Text = trdo.Rows[0]["Nombre"].ToString(); txtApellido.Text = trdo.Rows[0]["Apellido"].ToString(); txtDescripcion.Text = trdo.Rows[0]["Descripcion"].ToString(); } } if (ban == 0) { txtNombre.Text = ""; txtApellido.Text = ""; txtDescripcion.Text = ""; } Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; Grilla.Columns[6].Visible = false; Grilla.Columns[4].HeaderText = "Fecha Pago"; Grilla.Columns[4].Width = 130; Grilla.Columns[7].Width = 180; Grilla.Columns[8].HeaderText = "Imp. pagado"; Grilla.Columns[8].Width = 120; }
private void CargarGastosGeneralesxCodStoxk(Int32 CodStock) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cGastosPagar gastos = new Clases.cGastosPagar(); DataTable trdo = gastos.GetGastosPagarxCodStock(CodStock); trdo = fun.TablaaMiles(trdo, "Importe"); GrillaGastosRecepcion.DataSource = trdo; GrillaGastosRecepcion.Columns[0].Width = 250; GrillaGastosRecepcion.Columns[3].Width = 120; GrillaGastosRecepcion.Columns[3].HeaderText = "Fecha Pago"; }
private void FrmDetalleSaldosEfectivosaPagar_Load(object sender, EventArgs e) { Int32 CodRegistro = Convert.ToInt32(Principal.CodigoPrincipalAbm); Clases.cSaldoEfectivoPagar saldo = new Clases.cSaldoEfectivoPagar(); DataTable trdo = saldo.GetSaldos(CodRegistro); Clases.cFunciones fun = new Clases.cFunciones(); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; }
private void FrmDetalleSaldoCobranzaGeneral_Load(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); Int32 CodCobranza = Convert.ToInt32(Principal.CodigoPrincipalAbm); Clases.cSaldoCobranzaGeneral saldo = new Clases.cSaldoCobranzaGeneral(); DataTable trdo = saldo.GetSaldoCobranza(CodCobranza); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; Grilla.Columns[2].Width = 100; Grilla.Columns[3].Width = 160; }
private void CargarCheques(Int32 CodStock) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cCompra compra = new Clases.cCompra(); Int32 CodCompra = compra.GetCodCompraxCodStock(CodStock); Clases.cChequesaPagar cheque = new Clases.cChequesaPagar(); DataTable trdo = cheque.GetChequesxCodCompra(CodCompra); trdo = fun.TablaaMiles(trdo, "Importe"); GrillaCheques.DataSource = trdo; GrillaCheques.Columns[3].HeaderText = "Fecha Pago"; GrillaCheques.Columns[3].Width = 100; GrillaCheques.Columns[4].Width = 270; GrillaCheques.Columns[5].Visible = false; GrillaCheques.Columns[6].Visible = false; DataTable tComp = compra.GetCompraxCodigo(CodCompra); GetEfectivoPagar(CodCompra); if (tComp.Rows.Count > 0) { if (tComp.Rows[0]["ImporteEfectivo"].ToString() != "") { txtEfectivo.Text = tComp.Rows[0]["ImporteEfectivo"].ToString(); txtEfectivo.Text = fun.SepararDecimales(txtEfectivo.Text); txtEfectivo.Text = fun.FormatoEnteroMiles(txtEfectivo.Text); } if (tComp.Rows[0]["ImporteAutoPartePago"].ToString() != "") { txtImporteAutoPartePago.Text = tComp.Rows[0]["ImporteAutoPartePago"].ToString(); txtImporteAutoPartePago.Text = fun.SepararDecimales(txtImporteAutoPartePago.Text); txtImporteAutoPartePago.Text = fun.FormatoEnteroMiles(txtImporteAutoPartePago.Text); } if (tComp.Rows[0]["CodStockSalida"].ToString() != "") { Clases.cStockAuto stock = new Clases.cStockAuto(); DataTable tauto = stock.GetStockxCodigo(Convert.ToInt32(tComp.Rows[0]["CodStockSalida"].ToString())); if (tauto.Rows.Count > 0) { txtPatente2.Text = tauto.Rows[0]["Patente"].ToString(); txtDescripcion2.Text = tauto.Rows[0]["Descripcion"].ToString(); } } //GetStockxCodigo } }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); int Impagos = 0; if (chkImpagos.Checked == true) { Impagos = 1; } //Clases.cFunciones fun = new Clases.cFunciones(); Clases.cGastosPagar gasto = new Clases.cGastosPagar(); DataTable trdo = gasto.GetGastosPagarxFecha(FechaDesde, FechaHasta, txtPatente.Text, Impagos); trdo = fun.TablaaMiles(trdo, "Importe"); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); Grilla.DataSource = trdo; Grilla.Columns[5].HeaderText = "Fecha Pago"; Grilla.Columns[0].Visible = false; Grilla.Columns[1].Width = 160; Grilla.Columns[2].Width = 355; Grilla.Columns[4].Width = 120; Grilla.Columns[5].Width = 110; if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } }
private void CargarPrenda(Int32 CodPrenda) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cPrenda prenda = new Clases.cPrenda(); DataTable trdo = prenda.GetPrendaxCodigo(CodPrenda); Grilla.DataSource = fun.TablaaMiles(trdo, "Importe"); Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; Grilla.Columns[2].Width = 120; Grilla.Columns[3].Visible = false; Grilla.Columns[4].Visible = false; Grilla.Columns[5].Visible = false; Grilla.Columns[6].Width = 108; Grilla.Columns[7].Visible = false; Grilla.Columns[8].Width = 480; Grilla.Columns[8].HeaderText = "Entidad"; Grilla.Columns[6].HeaderText = "Fecha Pago"; }
private void CargarPatentesxCliente(Int32 CodCliente) { Clases.cAuto auto = new Clases.cAuto(); DataTable trdo = auto.GetAutosCompradosxCuotasxCodCliente(CodCliente); Clases.cFunciones fun = new Clases.cFunciones(); trdo = fun.TablaaMiles(trdo, "Capital"); GrillaPatente.DataSource = trdo; GrillaPatente.Columns[0].Visible = false; GrillaPatente.Columns[1].Visible = false; GrillaPatente.Columns[3].Width = 534; int b = 0; if (trdo.Rows.Count > 0) { if (trdo.Rows[0]["CodVenta"].ToString() != "") { b = 1; Int32 CodVenta = Convert.ToInt32(trdo.Rows[0]["CodVenta"].ToString()); CargarPlandeCuotas(CodVenta); } } else { return; } if (b == 0) { GrillaCuotas.DataSource = null; } GrillaCuotas.Columns[0].Visible = false; GrillaCuotas.Columns[1].Width = 73; GrillaCuotas.Columns[2].HeaderText = "Fecha vto."; GrillaCuotas.Columns[2].Width = 110; GrillaCuotas.Columns[4].HeaderText = "Fecha Pago."; GrillaCuotas.Columns[4].Width = 130; GrillaCuotas.Columns[5].HeaderText = "Importe Pago."; GrillaCuotas.Columns[5].Width = 140; }
private void Buscar() { Clases.cFunciones fun = new Clases.cFunciones(); string Patente = txtPatente.Text; Int32? CodMarca = null; if (cmbMarca.SelectedIndex > 0) { CodMarca = Convert.ToInt32(cmbMarca.SelectedValue); } Clases.cStockAuto stock = new Clases.cStockAuto(); DataTable trdo = stock.GetStockDetalladosVigente(Patente, CodMarca); txtTotalVehiculos.Text = trdo.Rows.Count.ToString(); trdo = fun.TablaaMiles(trdo, "Costo"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[7].HeaderText = "Concesión"; //Grilla.Columns[7].Visible = false; Grilla.Columns[2].Width = 170; Grilla.Columns[3].Width = 200; Grilla.Columns[4].Width = 100; Grilla.Columns[5].Width = 200; //double Total = fun.TotalizarColumna(trdo, "Costo"); double Total = fun.TotalizarColumnaCondicion(trdo, "Costo", "Concesion", "0"); double TotalConcesion = fun.TotalizarColumnaCondicion(trdo, "Costo", "Concesion", "1"); txtMontoTotal.Text = Total.ToString(); txtConcesion.Text = TotalConcesion.ToString(); if (txtMontoTotal.Text != "") { txtMontoTotal.Text = fun.SepararDecimales(txtMontoTotal.Text); txtMontoTotal.Text = fun.FormatoEnteroMiles(txtMontoTotal.Text); } if (txtConcesion.Text != "") { txtConcesion.Text = fun.SepararDecimales(txtConcesion.Text); txtConcesion.Text = fun.FormatoEnteroMiles(txtConcesion.Text); } }
public void CargarCostoxstock(Int32 CodStock) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cCosto costo = new Clases.cCosto(); DataTable trdo = costo.GetCostoxCodigoStock(CodStock); //agrego el boton Grilla.DataSource = fun.TablaaMiles(trdo, "Importe"); // Grilla.ColumnHeadersDefaultCellStyle.Font = new Font("Microsoft Sans Serif", 14); // Grilla.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 12); Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; Grilla.Columns[2].Width = 420; Grilla.Columns[3].Width = 150; Grilla.Columns[4].Width = 150; Grilla.Columns[3].Width = 100; Grilla.Columns[2].HeaderText = "Descripción"; CalcularTotalGeneral(); Grilla.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight; // Estilo(); }
private void btnBuscar_Click(object sender, EventArgs e) { Clases.cFunciones fun = new Clases.cFunciones(); if (fun.ValidarFecha(txtFechaDesde.Text) == false) { MessageBox.Show("Fecha desde incorrecta", Clases.cMensaje.Mensaje()); return; } if (fun.ValidarFecha(txtFechaHasta.Text) == false) { MessageBox.Show("Fecha hasta incorrecta", Clases.cMensaje.Mensaje()); return; } if (Convert.ToDateTime(txtFechaDesde.Text) > Convert.ToDateTime(txtFechaHasta.Text)) { MessageBox.Show("La fecha desde debe ser inferior a la fecha hasta", Clases.cMensaje.Mensaje()); return; } DateTime FechaDesde = Convert.ToDateTime(txtFechaDesde.Text); DateTime FechaHasta = Convert.ToDateTime(txtFechaHasta.Text); Clases.cPagoIntereses pago = new Clases.cPagoIntereses(); DataTable trdo = pago.GetPagosInteresxFecha(FechaDesde, FechaHasta); txtTotal.Text = fun.TotalizarColumna(trdo, "Importe").ToString(); if (txtTotal.Text != "") { txtTotal.Text = fun.SepararDecimales(txtTotal.Text); txtTotal.Text = fun.FormatoEnteroMiles(txtTotal.Text); } trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Width = 630; }
private void Buscar() { DateTime Desde = Convert.ToDateTime(txtFechaDesde.Text); DateTime Hasta = Convert.ToDateTime(txtFechaHasta.Text); int SoloImpago = 0; if (chkSoloImpago.Checked == true) { SoloImpago = 1; } cChequeCobrar cheque = new cChequeCobrar(); DataTable trdo = cheque.GetChequesxFecha(Desde, Hasta, SoloImpago); Clases.cFunciones fun = new Clases.cFunciones(); trdo = fun.TablaaMiles(trdo, "Importe"); Grilla.DataSource = trdo; Grilla.Columns[0].Visible = false; Grilla.Columns[2].HeaderText = "Nro Cheque"; Grilla.Columns[5].HeaderText = "Fecha Cobro"; Grilla.Columns[2].Width = 120; Grilla.Columns[3].Width = 200; Grilla.Columns[5].Width = 120; Grilla.Columns[9].Width = 160; }
public void CargarCostoxstock(Int32 CodStock) { Clases.cFunciones fun = new Clases.cFunciones(); Clases.cCosto costo = new Clases.cCosto(); DataTable trdo = costo.GetCostoxCodigoStock(CodStock); //agrego el boton Grilla.DataSource = fun.TablaaMiles(trdo, "Importe"); // Grilla.ColumnHeadersDefaultCellStyle.Font = new Font("Microsoft Sans Serif", 14); // Grilla.DefaultCellStyle.Font = new Font("Microsoft Sans Serif", 12); Grilla.Columns[0].Visible = false; Grilla.Columns[1].Visible = false; Grilla.Columns[2].Width = 440; Grilla.Columns[3].Width = 90; Grilla.Columns[4].Width = 150; Grilla.Columns[2].HeaderText = "Descripción"; CalcularTotalGeneral(); Grilla.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight; //cargo los gastos Clases.cGasto gasto = new Clases.cGasto(); if (txtCodStock.Text != "") { DataTable tgasto = gasto.GetGastosRecepcionxCodStock2(Convert.ToInt32(txtCodStock.Text)); GrillaGastosRecepcion.DataSource = tgasto; GrillaGastosRecepcion.Columns[0].Visible = false; GrillaGastosRecepcion.Columns[2].Visible = false; txtImporteGastoRecepcion.Text = ""; GrillaGastosRecepcion.Columns[1].Width = 450; Grilla.Columns[2].HeaderText = "Descripción"; CalcularTotalGeneral(); Grilla.Columns[4].DefaultCellStyle.Alignment = DataGridViewContentAlignment.BottomRight; } }