private DataTable Lista_UbigeoInvRollos_gen()
        {
            DtReporte = new DataTable("UbigRollos_gen");
            try
            {
                var BL = new tb_60local_stock_inventario_rolloBL();
                var BE = new tb_60local_stock_inventario_rollo();

                BE.moduloid = moduloid.Trim();
                BE.local = local.Trim();
                BE.fechatoma = Convert.ToDateTime(fechdoc.Trim());

                DtReporte = BL.GetAllUbigeoRollos_gen(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];

                if (DtReporte != null)
                {
                    return DtReporte;
                }
                else
                {
                    return DtReporte;
                }
            }
            catch (Exception ex)
            {
                return null;
            }
        }
        private void ValidaTabladetallemovmov(String xrollo)
        {
            var rowrollo = Tabladetallemov.Select("rollo='" + xrollo + "'");
            if (rowrollo.Length > 0)
            {
                MessageBox.Show("Rollo Ya Existe !!!!!!!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            Decimal xstocklibros = 0,
            xstockfisico = 0,
            xdiferencia = 0;

            griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["productname"].Value = string.Empty;
            if (xrollo.Trim().Length == 10)
            {
                var  BL2 = new tb_60local_stock_inventario_rollo_cargaBL();
                var  BE2 = new tb_60local_stock_inventario_rollo_carga();
                var dt2 = new DataTable();
                BE2.rollo = xrollo;
                dt2 = BL2.GetAll_rollo(EmpresaID, BE2).Tables[0];
                if (dt2.Rows.Count > 0)
                {
                    var Mensaje = "» ROLLO: " + dt2.Rows[0]["rollo"].ToString() + "\n\n" +
                                "     »»  TipDoc: " + dt2.Rows[0]["tipodoc"].ToString() + "\n" +
                                "     »»  SerDoc: " + dt2.Rows[0]["serdoc"].ToString() + "\n" +
                                "     »»  NumDoc: " + dt2.Rows[0]["numdoc"].ToString();
                    MessageBox.Show(Mensaje, "» Rollos Existentes ...");
                    return;
                }

                var BE = new tb_60local_stock_inventario_rollo();
                var BL = new tb_60local_stock_inventario_rolloBL();
                var dt = new DataTable();
                BE.rollo = xrollo;

                dt = BL.GetAll_Rollo(EmpresaID, BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["rollo"].Value = dt.Rows[0]["rollo"].ToString().Trim();
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["productid"].Value = dt.Rows[0]["productid"].ToString().Trim();
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["productname"].Value = dt.Rows[0]["productname"].ToString().Trim();
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["stocklibros"].Value = dt.Rows[0]["stocklibros"].ToString().Trim();
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["stockfisico"].Value = dt.Rows[0]["stockfisico"].ToString().Trim();
                    xstocklibros = Convert.ToDecimal(dt.Rows[0]["stocklibros"].ToString());
                    xstockfisico = Convert.ToDecimal(dt.Rows[0]["stockfisico"].ToString());
                    xdiferencia = xstocklibros - xstockfisico;
                    griddetallemov.Rows[griddetallemov.CurrentCell.RowIndex].Cells["diferencia"].Value = xdiferencia;
                    Tabladetallemov.AcceptChanges();
                    griddetallemov.CurrentCell = griddetallemov.Rows[griddetallemov.RowCount - 1].Cells["stockfisico"];
                }
                else
                {
                    MessageBox.Show("Rollo no Existe en Tabla Inventario !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            else
            {
                MessageBox.Show("Rollo no Existe !!! ", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private DataTable Lista_DiferenciaInvRollos()
        {
            DtReporte = new DataTable("DifRollos");
            try
            {
                var BL = new tb_60local_stock_inventario_rolloBL();
                var BE = new tb_60local_stock_inventario_rollo();

                BE.moduloid = moduloid.Trim();
                BE.local = local.Trim();
                BE.lineaid = lineaid.Trim();
                BE.productid = productid.Trim();
                BE.rollo = rollo.Trim();
                BE.fechatoma = Convert.ToDateTime(fechdoc.Trim());
                BE.dif = dif;

                DtReporte = BL.GetAllDifRollos(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];

                if (DtReporte != null)
                {
                    return DtReporte;
                }
                else
                {
                    return DtReporte;
                }
            }
            catch (Exception ex)
            {
                return null;
            }
        }