Indicadores por Proyecto
This commit is contained in:
@@ -92,6 +92,7 @@ Partial Class Compras_RepCxP
|
||||
If Not Page.IsPostBack Then
|
||||
CargaCombos()
|
||||
CargaGvPersonalizarRaqngoColumnas()
|
||||
ProcesaRequest()
|
||||
CargaDatos()
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
@@ -101,6 +102,36 @@ Partial Class Compras_RepCxP
|
||||
End Sub
|
||||
|
||||
#Region "CARGAS"
|
||||
|
||||
Private Sub ProcesaRequest()
|
||||
|
||||
If Request("FechaInicio") IsNot Nothing AndAlso IsDate(Request("FechaInicio")) Then
|
||||
txtFechaI.Text = Request("FechaInicio")
|
||||
End If
|
||||
If Request("FechaFin") IsNot Nothing AndAlso IsDate(Request("FechaFin")) Then
|
||||
txtFechaF.Text = Request("FechaFin")
|
||||
End If
|
||||
|
||||
If Request("TipoDocto") IsNot Nothing AndAlso Request("TipoDocto").Length > 0 Then
|
||||
Dim tipodoctos As String() = Request("TipoDocto").Split(","c)
|
||||
|
||||
For Each itemTipoDocto As ListItem In DdlTipoDocto.Items
|
||||
For Each tipoDocto As String In tipodoctos
|
||||
itemTipoDocto.Selected = (tipoDocto.ToUpper = itemTipoDocto.Value.ToUpper)
|
||||
Next
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
If Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero <> 0 Then
|
||||
DdlMoneda.SelectedValueExist(Request("CveMoneda").ToEntero)
|
||||
End If
|
||||
|
||||
If Request("CveSubProyecto") IsNot Nothing AndAlso Request("CveSubProyecto").ToEntero <> 0 Then
|
||||
DdlSubProyecto.SelectedValueExist(Request("CveSubProyecto").ToEntero)
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Private Sub CargaCombos()
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
|
||||
|
||||
@@ -31,6 +31,7 @@ public partial class Compras_RepPagado : ClsPaginas
|
||||
if (!IsPostBack)
|
||||
{
|
||||
InicializaValores();
|
||||
ProcesaRequest();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,6 +74,50 @@ public partial class Compras_RepPagado : ClsPaginas
|
||||
TxtFechaFCompra.Text = DateTime.Now.ToShortDateString();
|
||||
}
|
||||
|
||||
|
||||
private void ProcesaRequest()
|
||||
{
|
||||
if (DateTime.TryParse(Request["FechaInicio"], out DateTime fechaInicio))
|
||||
{
|
||||
txtFechaI.Text = fechaInicio.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
if (DateTime.TryParse(Request["FechaFin"], out DateTime fechaFin))
|
||||
{
|
||||
txtFechaF.Text = fechaFin.ToString("yyyy-MM-dd");
|
||||
}
|
||||
|
||||
//if (Request["TipoDocto"] != null && Request["TipoDocto"].Length > 0)
|
||||
//{
|
||||
// string[] tipodoctos = Request["TipoDocto"].Split(',');
|
||||
// foreach (ListItem itemTipoDocto in DdlTipoDocto.Items)
|
||||
// {
|
||||
// foreach (string tipoDocto in tipodoctos)
|
||||
// {
|
||||
// itemTipoDocto.Selected = tipoDocto.ToUpper() == itemTipoDocto.Value.ToUpper();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
|
||||
if (Request["CveMoneda"] != null && Request["CveMoneda"].ToEntero() != 0)
|
||||
{
|
||||
DdlMoneda.SelectedValueExist(Request["CveMoneda"].ToEntero());
|
||||
}
|
||||
|
||||
if (Request["CveSubProyecto"] != null && Request["CveSubProyecto"].ToEntero() != 0)
|
||||
{
|
||||
DdlSubProyecto.SelectedValueExist(Request["CveSubProyecto"].ToEntero());
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ((DateTime.TryParse(Request["FechaInicio"], out DateTime fechaInicio2)) && (DateTime.TryParse(Request["FechaFin"], out DateTime fechaFin2)))
|
||||
{
|
||||
CargaDatos();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void CargaCuentasBancarias()
|
||||
{
|
||||
DdlCuentaBancaria.Items.Clear();
|
||||
|
||||
Reference in New Issue
Block a user