Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -35,6 +35,12 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
get { return (ViewState["CveExportacionDetalle"] == null) ? -1 : Convert.ToInt32(ViewState["CveExportacionDetalle"]); }
|
||||
set { ViewState["CveExportacionDetalle"] = value; }
|
||||
}
|
||||
|
||||
private bool EsImportacion
|
||||
{
|
||||
get { return (ViewState["EsImportacion"] == null) ? false : Boolean.Parse(ViewState["EsImportacion"].ToString()); }
|
||||
set { ViewState["EsImportacion"] = value; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -42,6 +48,12 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
EsImportacion = false;
|
||||
if (!string.IsNullOrEmpty(Request["Opcion"]) && Request["Opcion"].Equals("I", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
EsImportacion = true;
|
||||
}
|
||||
|
||||
CveExportacion = !string.IsNullOrEmpty(Request["CveExportacion"]) ? Request["CveExportacion"].ToEntero() : -1;
|
||||
InicializarValores();
|
||||
CargaDatos();
|
||||
@@ -117,7 +129,8 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
{
|
||||
DataTable DTExportaciones = new DataTable();
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
if (Exportaciones.GetExportacion(CveExportacion, UsuarioActual.CveEmpresa))
|
||||
bool EsExportacion = !EsImportacion;
|
||||
if (Exportaciones.GetExportacion(CveExportacion, UsuarioActual.CveEmpresa, EsExportacion))
|
||||
{
|
||||
DTExportaciones = Exportaciones.DtResultados;
|
||||
if (DTExportaciones.Rows.Count > 0)
|
||||
@@ -371,7 +384,7 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
decimal DecOtros = ModExtensiones.ToDecimal(TxtDecOtros.Text);
|
||||
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
|
||||
bool EsExportacion = !EsImportacion;
|
||||
if (CveExportacion == -1)
|
||||
{
|
||||
int ExportacionGuardada = Exportaciones.AddExportacion(
|
||||
@@ -404,7 +417,8 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
CvePedimento,
|
||||
CveAgenteExtranjero,
|
||||
ITN,
|
||||
Vinculacion
|
||||
Vinculacion,
|
||||
EsExportacion
|
||||
);
|
||||
if (ExportacionGuardada != -1)
|
||||
{
|
||||
@@ -442,8 +456,10 @@ public partial class Export_ExpDetalle : ClsPaginas
|
||||
}
|
||||
|
||||
//string Liga = "document.location.href=\"/Export/RepExportaciones.aspx\";";
|
||||
string Liga = $"document.location.href=\"/Export/ExpDetalle.aspx?CveExportacion={ExportacionGuardada}\";";
|
||||
Alert("La Exportación se ha agregado correctamente.", JSBtnAceptar: Liga);
|
||||
string liga = EsImportacion
|
||||
? $"document.location.href=\"/Export/ExpDetalle.aspx?CveExportacion={ExportacionGuardada}&Opcion=I\";"
|
||||
: $"document.location.href=\"/Export/ExpDetalle.aspx?CveExportacion={ExportacionGuardada}\";";
|
||||
Alert("La Exportación se ha agregado correctamente.", JSBtnAceptar: liga);
|
||||
}
|
||||
Exportaciones.Dispose();
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public partial class Export_RepExportaciones : ClsPaginas
|
||||
protected void CargaExportaciones()
|
||||
{
|
||||
ClsExportaciones Exportaciones = new ClsExportaciones();
|
||||
int EsExportacion = EsImportacion ? 0 : 1; // 0 = importación, 1 = exportación
|
||||
bool EsExportacion = !EsImportacion;
|
||||
if (Exportaciones.GetExportacion(-1, UsuarioActual.CveEmpresa, EsExportacion))
|
||||
{
|
||||
GVExportaciones.DataSource = Exportaciones.DtResultados;
|
||||
|
||||
Reference in New Issue
Block a user