Simplificar referencias a logos en RDLC y más limpieza de código

This commit is contained in:
MLopez
2022-12-22 19:26:13 -07:00
parent 2e4bfe761b
commit 5ef0983e77
260 changed files with 446 additions and 591 deletions

View File

@@ -365,7 +365,7 @@ public partial class CGame_AsignacionEmpaque : ClsPaginas
{
if (DtCajas.Rows.Count > 0 && DtBins.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();

View File

@@ -511,7 +511,7 @@ public partial class CGame_AsignacionEmpaque2 : ClsPaginas
{
if (DtCajas.Rows.Count > 0 && DtBins.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();

View File

@@ -1279,7 +1279,7 @@ public partial class Empaque : ClsPaginas
if (DtCorte.Rows.Count > 0 && DtResultado.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));

View File

@@ -408,7 +408,7 @@ public partial class CATCorte : ClsPaginas {
#region Validacion
public bool Valida()
{
{
if (DdlOrdenCorte.SelectedValue == "-2")
{
Alert("Tiene que seleccionar una orden de corte", ModExtensiones.TipoMensaje.MsgAdvertencia);

View File

@@ -274,7 +274,7 @@ public partial class CGame_Liquidacion : ClsPaginas
TotPesoPri = DtIngresos.SUM("PesoPrimera");
TotPesoSeg = DtIngresos.SUM("PesoSegunda");
TotPesoJug = DtIngresos.SUM("PesoJugo");
TotCantidadPri = DtIngresos.SUM("CantidadPrimera");
TotCantidadPri = DtIngresos.SUM("CantidadPrimera");
TotCantidadSeg = DtIngresos.SUM("CantidadSegunda");
TotCantidadJug = DtIngresos.SUM("CantidadJugo");
Merma = DtIngresos.Rows[0]["Merma"].ToString().ToDouble();

View File

@@ -1676,7 +1676,7 @@ Partial Class CGame_OrdenProduccion
If ObjCGame.GetOrdenProduccion(CveOrdenProduccion, UsuarioActual.CveEmpresa, -1, "-1", MinFecha, MaxFecha, -1) Then
If ObjCGame.DtResultados.Rows.Count > 0 Then
Dim Dt As New DataTable
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
Dim params As New List(Of ReportParameter)
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))

View File

@@ -216,7 +216,7 @@ public partial class CGame_RepAvance : ClsPaginas
// }
// ObjCGame.Dispose();
// if ((DtIngresosPrimera.Rows.Count > 0 || DtIngresosSegunda.Rows.Count > 0) || (DtGastosPrimera.Rows.Count > 0 || DtGastosSegunda.Rows.Count > 0))
// if ((DtIngresosPrimera.Rows.Count > 0 || DtIngresosSegunda.Rows.Count > 0) || (DtGastosPrimera.Rows.Count > 0 || DtGastosSegunda.Rows.Count > 0))
// {
// double TotIngresosPrimera = 0, TotIngresosSegunda = 0, TotGastosPrimera = 0, TotGastosSegunda = 0, TotPesoPrimera = 0, TotPesoSegunda = 0, MermaPrimera = 0, MermaSegunda = 0, TotCantidadPrimera=0, TotCantidadSegunda=0;
// if (DtIngresosPrimera.Rows.Count > 0) { TotIngresosPrimera = DtIngresosPrimera.SUM("Importe"); TotPesoPrimera = DtIngresosPrimera.SUM("Peso"); MermaPrimera = DtIngresosPrimera.SUM("Merma"); TotCantidadPrimera = DtIngresosPrimera.SUM("Cantidad"); }

View File

@@ -120,7 +120,7 @@ public partial class CGame_RepEmpaque : ClsPaginas
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $"&emsp;<b>Fecha Entrega Inicial:</b> {txtFechaI.Text}"; }
String Huerta;
if (DdlHuerta.SelectedValue != "-1") { Huerta = $"&emsp;<b>Huerta:</b> {DdlHuerta.SelectedItem.Text}"; } else { Huerta = ""; }
String Folio;
String Folio;
if (TxtFolio.Text != "") { Folio = $"&emsp;<b>Folio:</b> {TxtFolio.Text}"; } else { Folio = ""; }
if (DtDatos.Rows.Count > 0)
{

View File

@@ -71,7 +71,7 @@ public partial class CGame_RepOrdenCorte : ClsPaginas
protected void GenerarPDF(String Opcion)
{
String FechaF;
String FechaF;
if (txtFechaF.Text == "" || txtFechaF.Text == "__/__/____") { FechaF = "-1"; } else { FechaF = $"&emsp;<b>Fecha Entrega Final:</b> {txtFechaF.Text}"; }
String FechaI;
if (txtFechaI.Text == "" || txtFechaI.Text == "__/__/____") { FechaI = "-1"; } else { FechaI = $"&emsp;<b>Fecha Entrega Inicial:</b> {txtFechaI.Text}"; }

View File

@@ -123,7 +123,7 @@ public partial class CGame_RepOrdenProduccion :ClsPaginas
if (TxtFolio.Text != "") { Folio = $"&emsp;<b>Folio:</b> {TxtFolio.Text}"; } else { Folio = ""; }
if (DtDatos.Rows.Count > 0)
{
System.IO.FileInfo Imagen = new System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
System.IO.FileInfo Imagen = new System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png");
String logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
List<ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));