private void ImpresionTomaInv() { var tablaReport = new DataTable(); var BL = new tb_60local_stockBL(); var BE = new tb_60local_stock(); BE.moduloid = ((D60ALMACEN.MainAlmacen)MdiParent).moduloid; BE.local = ((D60ALMACEN.MainAlmacen)MdiParent).local; BE.lineaid = lineaid.Text.Trim(); BE.status = "0"; tablaReport = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; if (tablaReport.Rows.Count == 0) { MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { var miForma = new Frm_Reportes(); var reporteInventario = new REPORTES.CR_tomainventario(); miForma.Text = "Toma de Inventario : Linea"; reporteInventario.DataDefinition.FormulaFields["almacen"].Text = "'" + ((D60ALMACEN.MainAlmacen)MdiParent).moduloname + "'"; miForma.Table = tablaReport; miForma.Reporte = reporteInventario; miForma.Show(); } }
private void ImpresionKardexArticulo() { var TablaProductokardex_tela = new DataTable(); var BL = new tb_me_movimientosdetBL(); var BE = new tb_me_movimientosdet(); BE.moduloid = modulo; BE.local = local; BE.lineaid = lineaid.Text.Trim(); BE.grupoid = grupoid.Text.Trim(); BE.subgrupoid = subgrupoid.Text.Trim(); BE.productid = productid.Text.Trim(); BE.colorid = colorid.Text.Trim(); BE.mottrasladointid = mottrasladointid.Text.Trim(); BE.Ubicacion = produbic.Text.Trim(); BE.ctacte = ctacte.Text.Trim(); BE.direcnume = direcnume.ToString(); BE.fechdocini = Convert.ToDateTime(fechdocini.Text.Substring(0, 10)); BE.fechdocfin = Convert.ToDateTime(fechdocfin.Text.Substring(0, 10)); BE.serref = serref.Text.Trim(); BE.numref = numdococ1.Text.Trim() + numdococ.Text.Trim(); if (almacaccionid.SelectedValue.ToString() != string.Empty) { BE.almacaccionid = almacaccionid.SelectedValue.ToString(); } TablaProductokardex_tela = BL.GetAll_productokardex(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; if (TablaProductokardex_tela.Rows.Count == 0) { MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { var miForma = new Frm_Reportes(); var reporteRollokardex = new REPORTES.CR_productokardex(); miForma.Text = "Reporte de Kardex x Articulo"; reporteRollokardex.DataDefinition.FormulaFields["fechdoc"].Text = "'DE: " + fechdocini.Text.Substring(0, 10) + " AL:" + fechdocfin.Text.Substring(0, 10) + "'"; reporteRollokardex.DataDefinition.FormulaFields["almacen"].Text = "'" + VariablesPublicas.EmpresaTipo + "'"; if (modulo.Trim() == "0810") { reporteRollokardex.DataDefinition.FormulaFields["name"].Text = "'TIENDA : " + VariablesPublicas.Local + " - " + VariablesPublicas.nombrelocal + "'"; } else { reporteRollokardex.DataDefinition.FormulaFields["name"].Text = "'LOCAL : " + VariablesPublicas.Local + " - " + VariablesPublicas.nombrelocal + "'"; } if (modulo == "0320") { reporteRollokardex.DataDefinition.FormulaFields["varitems"].Text = "'ROLLO'"; } else { reporteRollokardex.DataDefinition.FormulaFields["varitems"].Text = "''"; } miForma.Table = TablaProductokardex_tela; miForma.Reporte = reporteRollokardex; miForma.Show(); } }
private void ImpresionFormato131() { var TablaMov_balancestock = new DataTable("mov_balancestock"); var BL = new tb_60movimientosdetBL(); var BE = new tb_60movimientosdet(); var mes1 = Convert.ToInt32(cboPerimesini.SelectedValue.ToString()); var mes2 = Convert.ToInt32(cboPerimesfin.SelectedValue.ToString()); BE.moduloid = modulo; BE.local = local; BE.perianio = ((MERCADERIA.MainMercaderia)MdiParent).perianio; if (mes1 < 10) { BE.perimesini = "0" + Convert.ToString(cboPerimesini.SelectedValue.ToString()); } else { BE.perimesini = Convert.ToString(cboPerimesini.SelectedValue.ToString()); } if (mes2 < 10) { BE.perimesfin = "0" + Convert.ToString(cboPerimesfin.SelectedValue.ToString()); } else { BE.perimesfin = Convert.ToString(cboPerimesfin.SelectedValue.ToString()); } BE.lineaid = lineaid.Text.Trim(); BE.grupoid = grupoid.Text.Trim(); BE.subgrupoid = subgrupoid.Text.Trim(); BE.productidini = productid.Text.Trim(); var dt = new DataTable(); dt = BL.GetAll_Balance(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; TablaMov_balancestock = dt; if (TablaMov_balancestock.Rows.Count == 0) { MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { var miForma = new Frm_Reportes(); var reporteBalanceStock = new REPORTES.CR_mov_balancestock(); miForma.Text = "Reporte Balance de Stock"; Fech_impresion(); reporteBalanceStock.DataDefinition.FormulaFields["empresaestable"].Text = "': " + VariablesPublicas.EmpresaEstablec.Trim() + "'"; reporteBalanceStock.DataDefinition.FormulaFields["empresatipo"].Text = "': " + ((MERCADERIA.MainMercaderia)MdiParent).moduloname + "'"; reporteBalanceStock.DataDefinition.FormulaFields["empresaperiodo"].Text = "': " + VariablesPublicas.N_PrimerMes1.Trim() + " " + VariablesPublicas.perianio.Trim() + "'"; if (VariablesPublicas.N_FinMes1 == string.Empty) { reporteBalanceStock.DataDefinition.FormulaFields["mesperifin"].Text = string.Empty; } else { reporteBalanceStock.DataDefinition.FormulaFields["mesperifin"].Text = "'- " + VariablesPublicas.N_FinMes1.Trim() + " " + VariablesPublicas.perianio.Trim() + "'"; } reporteBalanceStock.DataDefinition.FormulaFields["fechaimpresion"].Text = "': " + VariablesPublicas.FechImpresion + "'"; miForma.Table = TablaMov_balancestock; miForma.Reporte = reporteBalanceStock; miForma.Show(); } }
private void btnficha_Click(object sender, EventArgs e) { if (u_n_opsel == 0 & (Examinar.CurrentRow != null)) { var xficha = Examinar.Rows[Examinar.CurrentRow.Index].Cells["fichaid"].Value.ToString(); var xempresa = Examinar.Rows[Examinar.CurrentRow.Index].Cells["empresaid"].Value.ToString(); var xfichero = string.Empty; DataTable dt = null; var ncont = 0; var zprocesafoto = false; var BL = new tb_plla_fichatrabajadoresBL(); var BE = new tb_plla_fichatrabajadores(); BE.FichaidIni = xficha; BE.FichaidFin = xficha; BE.Empresaid = xempresa; BE.Norden = 2; dt = BL.GetAll_FichaDatos(VariablesPublicas.EmpresaID, BE).Tables[0]; VariablesPublicas.CrearXml(dt, "fichadatos"); if (BL.Sql_Error.Trim().Length == 0) { if (dt.Rows.Count > 0) { for (ncont = 0; ncont <= dt.Rows.Count - 1; ncont++) { xfichero = string.Empty; zprocesafoto = false; if (dt.Rows[ncont]["fotografia"].ToString().Trim().Length > 0) { xfichero = GlobalVars.GetInstance().RutaFotoPersonal + dt.Rows[ncont]["fotografia"].ToString().Trim(); if (System.IO.File.Exists(xfichero)) { try { dt.Rows[ncont]["gfoto"] = VariablesPublicas.ImageToByte(System.Drawing.Image.FromFile(GlobalVars.GetInstance().RutaFotoPersonal + dt.Rows[ncont]["fotografia"].ToString().Trim()), true); zprocesafoto = true; } catch (Exception ex) { dt.Rows[ncont]["fotografia"] = string.Empty; } } } else { zprocesafoto = true; } if (!zprocesafoto) { dt.Rows[ncont]["gfoto"] = VariablesPublicas.ImageToByte(BapFormulariosNet.Properties.Resources.error, false); dt.Rows[ncont]["fotografia"] = "ERROR"; } } var frmreporte = new Frm_Reportes(); frmreporte.Table = dt; frmreporte.Reporte = new Crpt_FichaTrabajador(); frmreporte.Show(); } else { MessageBox.Show("No existe Información a Procesar", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } }
private void ImpresionTomaInv() { DataTable tablaReport = new DataTable(); tb_60local_stockBL BL = new tb_60local_stockBL(); tb_60local_stock BE = new tb_60local_stock(); BE.moduloid = VariablesPublicas.Moduloid; BE.local = VariablesPublicas.Local; BE.lineaid = lineaid.Text.Trim(); BE.status = chkTodos.Checked ? "1" : "0"; tablaReport = BL.GetAll_productostock(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0]; if (tablaReport.Rows.Count == 0) { MessageBox.Show("No existe Información Procesada", "Mensaje del Sistema", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { Frm_Reportes miForma = new Frm_Reportes(); REPORTES.CR_tomainventario reporteInventario = new REPORTES.CR_tomainventario(); miForma.Text = "Toma de Inventario : Linea"; reporteInventario.DataDefinition.FormulaFields["almacen"].Text = "'" + VariablesPublicas.EmpresaTipo + "'"; reporteInventario.DataDefinition.FormulaFields["name"].Text = "'TIENDA : " + VariablesPublicas.Local + " - " + VariablesPublicas.nombrelocal + "'"; #region -- Commentado //reporteInventario.DataDefinition.FormulaFields["empresaname"].Text = "'EMPRESA: " + VariablesPublicas.EmpresaName.Trim() + "'"; //reporteInventario.DataDefinition.FormulaFields["empresaruc"].Text = "'RUC: " + VariablesPublicas.EmpresaRuc.Trim() + "'"; //variables que vamos a modificar //reporteRollokardex.DataDefinition.FormulaFields["fechdoc"].Text = "'DE: " + fechdocini.Trim().Substring(0, 10) + " AL:" + fechdocfin.Trim().Substring(0, 10) + "'"; //reporteInventario.SetDataSource(tablaReport); // miForma.Reporte.ReportSource = reporteInventario; //reporte.PrintOptions.PrinterName = "EPSON LQ-590 ESC/P2"; //reporte.PrintOptions.PaperOrientation = CrystalDecisions.Shared.PaperOrientation.Portrait; //reporte.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)GetPaperSize("EPSON LQ-590 ESC/P2", "cretencion"); //reporte.SetDataSource(tablaReport); //reporte.Refresh(); //reporte.PrintToPrinter(1, false, 0, 0); #endregion miForma.Table = tablaReport; miForma.Reporte = reporteInventario; miForma.Show(); } }