diff --git a/Export/ExpDetalle.aspx b/Export/ExpDetalle.aspx
index ac4590e6d..ea0f598b6 100644
--- a/Export/ExpDetalle.aspx
+++ b/Export/ExpDetalle.aspx
@@ -70,14 +70,26 @@
@@ -132,6 +144,14 @@
+
+
diff --git a/Export/RepExportaciones.aspx b/Export/RepExportaciones.aspx
index 951f87ba6..4e7769fe5 100644
--- a/Export/RepExportaciones.aspx
+++ b/Export/RepExportaciones.aspx
@@ -53,6 +53,21 @@
width: 100%;
height: 500px;
}
+
+#<%= GVExportaciones.ClientID %> .btn,
+#<%= GVExportaciones.ClientID %> .btn-circle {
+ display: inline-block !important;
+ width: auto !important;
+ min-width: 0 !important;
+ max-width: none !important;
+ vertical-align: middle !important;
+ margin-bottom: 0 !important;
+ margin-right: 4px;
+ float: none !important;
+ clear: none !important;
+}
+
+
@@ -148,11 +163,11 @@
-
+
-
+
- >
+
@@ -224,14 +239,28 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/Export/RepExportaciones.aspx.cs b/Export/RepExportaciones.aspx.cs
index d6977de3a..a93dfa6a8 100644
--- a/Export/RepExportaciones.aspx.cs
+++ b/Export/RepExportaciones.aspx.cs
@@ -28,7 +28,7 @@ public partial class Export_RepExportaciones : ClsPaginas
private bool EsImportacion
{
- get{ return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
+ get { return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
set { ViewState["EsImportacion"] = value; }
}
public string EmptyDataTextPersonalizado { get; set; }
@@ -43,7 +43,7 @@ public partial class Export_RepExportaciones : ClsPaginas
if (Request["Opcion"] != null)
{
if (Request["Opcion"] == "I")
- EsImportacion = true;
+ EsImportacion = true;
}
Page.Title = EsImportacion ? "Importaciones" : "Exportaciones";
@@ -86,7 +86,7 @@ public partial class Export_RepExportaciones : ClsPaginas
}
protected void CargaExportaciones()
{
-
+
bool EsExportacion = !EsImportacion;
string SubProyectos = DdlSubProyecto.GetSelectedValuesM();
SubProyectos = SubProyectos == "" ? "-1" : SubProyectos;
@@ -125,4 +125,76 @@ public partial class Export_RepExportaciones : ClsPaginas
Alert("La Exportación se ha eliminado correctamente.");
}
}
-}
\ No newline at end of file
+
+ protected void GVExportaciones_RowDataBound(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.DataRow)
+ {
+ var dataItem = (System.Data.DataRowView)e.Row.DataItem;
+ int cveExportacion = Convert.ToInt32(dataItem["CveExportacion"]);
+ HyperLink hl = (HyperLink)e.Row.FindControl("HlExpDetalle");
+
+ // Usa la bandera EsImportacion de la página
+ if (EsImportacion)
+ hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I";
+ else
+ hl.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}";
+
+ // EDITAR
+ HyperLink hlEditar = (HyperLink)e.Row.FindControl("HlEditar");
+ if (EsImportacion)
+ hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}&Opcion=I";
+ else
+ hlEditar.NavigateUrl = $"ExpDetalle.aspx?CveExportacion={cveExportacion}";
+
+ // Tipo Exportación
+ Label lblTipoExp = (Label)e.Row.FindControl("lblTipoExp");
+ if (lblTipoExp != null)
+ {
+ string valor = dataItem["TipoExportacion"].ToString();
+ switch (valor)
+ {
+ case "1":
+ lblTipoExp.Text = "(IMP) Importación";
+ break;
+ case "2":
+ lblTipoExp.Text = "(EXP) Exportación/retorno";
+ break;
+ case "3":
+ lblTipoExp.Text = "(TRA) Tránsitos";
+ break;
+ default:
+ lblTipoExp.Text = "Desconocido";
+ break;
+ }
+ }
+
+ // Estatus
+ Label lblEstatus = (Label)e.Row.FindControl("lblEstatus");
+ if (lblEstatus != null)
+ {
+ string valor = dataItem["CveExportacionEstatus"].ToString();
+ switch (valor)
+ {
+ case "1":
+ lblEstatus.Text = "Tránsito";
+ break;
+ case "2":
+ lblEstatus.Text = "Completa";
+ break;
+ default:
+ lblEstatus.Text = "Desconocido";
+ break;
+ }
+ }
+ }
+ }
+ protected void GVExportaciones_RowCreated(object sender, GridViewRowEventArgs e)
+ {
+ if (e.Row.RowType == DataControlRowType.Header)
+ {
+ // Cambia el texto del primer encabezado (ajusta el índice si no es la primera columna)
+ e.Row.Cells[0].Text = EsImportacion ? "Importación" : "Exportación";
+ }
+ }
+}