private void spmostrar_detalle_ingresoNombre() { this.dataListadoDetalleIngreso.DataSource = CN_Ingresos.spmostrar_detalle_ingresoNombre(this.txtBuscar.Text); }
private void spmostrar_detalle_ingresoymodificar() { this.dataListadoDetalleIngreso.DataSource = CN_Ingresos.spmostrar_detalle_ingresoymodificar(); }
private void spmostrar_detalle_ingresoCodigo() { this.dataListadoDetalleIngreso.DataSource = CN_Ingresos.spmostrar_detalle_ingresoCodigo(this.txtBuscarCodigo.Text); }
private void speditar_detallesingreso() { this.dataListadoDetalleIngreso.DataSource = CN_Ingresos.speditar_detallesingreso(Convert.ToInt32(this.txtiddetalle_ingreso.Text), Convert.ToDecimal(this.txtPrecioCompra.Text), Convert.ToDecimal(this.txtPrecioventa.Text), Convert.ToDateTime(this.dtFecha_Vencimiento.Text), Convert.ToInt32(this.txtstockinicial.Text), Convert.ToInt32(this.txtstockactual.Text)); }
private void BuscarFechas() { this.dataListado.DataSource = CN_Ingresos.BuscarFechas(this.dtFecha1.Value.ToString("yyyy/MM/dd"), this.dtFecha2.Value.ToString("yyyy/MM/dd")); //this.OcultarColumnas(); lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count); }
//private void OcultarColumnas() //{ // this.dataListado.Columns[0].Visible = false; // this.dataListado.Columns[1].Visible = false; //} //Método Mostrar private void Mostrar() { this.dataListado.DataSource = CN_Ingresos.Mostrar(); // this.OcultarColumnas(); lblTotal.Text = "Total de Registros: " + Convert.ToString(dataListado.Rows.Count); }
private void MostrarDetalle() { this.dataListadoDetalle.DataSource = CN_Ingresos.MostrarDetalle(this.txtId_Ingreso.Text); }
private void Guardar_Click(object sender, EventArgs e) { try { // dataListadoDetalle.Visible = false ; // dataListado.Visible = true; string Rpta = ""; if (this.txtserie.Text == string.Empty || txtcorrelativo.Text == string.Empty || txtigv.Text == string.Empty || dataListadoDetalle.Rows.Count == 0) { MensajeError("Falta ingresar algunos datos, serán remarcados"); errorProvider1.SetError(txtserie, "Ingrese la serie del comprobante"); errorProvider1.SetError(txtcorrelativo, "Ingrese el número del comprobante"); errorProvider1.SetError(txtigv, "Ingrese el porcentaje de IGV"); errorProvider1.SetError(dataListadoDetalle, "para generar un ingreso debe haber como minimo un Producto"); } else { if (this.IsNuevo) { int Comprobante; Comprobante = Convert.ToInt32(cmbComprobante.SelectedValue); int Proveedor; Proveedor = Convert.ToInt32(cboProveedor.SelectedValue); CD_Ingreso ingreso = new CD_Ingreso(); ingreso.UsuarioCreacion_Ingreso = idUsuario; ingreso.UsuarioUpdate_Ingreso = idUsuario; //Vamos a insertar un Ingreso Rpta = CN_Ingresos.Insertar(Proveedor, dtpfecha.Value, Comprobante, txtserie.Text, txtcorrelativo.Text, Convert.ToDecimal(txtigv.Text), "EMITIDO", idUsuario, idUsuario, dtDetalle); } //Si la respuesta fue OK, fue porque se modifico //o inserto el Ingreso //de forma correcta if (Rpta.Equals("OK")) { this.MensajeOk("Se insertó de forma correcta el registro"); } else { //Mostramos el mensaje de error this.MensajeError(Rpta); } this.IsNuevo = false; this.Botones(); this.Limpiar(); this.limpiarDetalle(); // this.Mostrar(); } } catch (Exception ex) { MessageBox.Show(ex.Message + ex.StackTrace); } }