This commit is contained in:
95
GPS/ReporteUnidadesnoTransmiten.aspx.cs
Normal file
95
GPS/ReporteUnidadesnoTransmiten.aspx.cs
Normal file
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
public partial class GPS_ReporteUnidadesnoTransmiten : ClsPaginas
|
||||
{
|
||||
#region Propiedades
|
||||
protected int CveCliente
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveCliente"] == null) { return 0; }
|
||||
else { return ViewState["CveCliente"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CveCliente"] = value; }
|
||||
}
|
||||
protected int CveEstatus
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["CveEstatus"] == null) { return 0; }
|
||||
else { return ViewState["CveEstatus"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["CveEstatus"] = value; }
|
||||
}
|
||||
protected int TipoDispositivo
|
||||
{
|
||||
get
|
||||
{
|
||||
if (ViewState["TipoDispositivo"] == null) { return 0; }
|
||||
else { return ViewState["TipoDispositivo"].ToString().ToEntero(); }
|
||||
}
|
||||
|
||||
set { ViewState["TipoDispositivo"] = value; }
|
||||
}
|
||||
#endregion
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
|
||||
DdlCliente.DataSource = get_GlobalDTCliente(UsuarioActual.CveEmpresa);
|
||||
DdlCliente.DataBind();
|
||||
CveCliente = -1;
|
||||
CveEstatus = 1;
|
||||
TipoDispositivo = -1;
|
||||
cargaDispositivos();
|
||||
}
|
||||
}
|
||||
public void cargaDispositivos()
|
||||
{
|
||||
GvDatosGPS.DataSource = null;
|
||||
using (ClsGPS ObjGPS = new ClsGPS())
|
||||
{
|
||||
if (ObjGPS.ReporteUnidadesnoTransmitenGet(-1, CveEstatus, CveCliente, UsuarioActual.CveEmpresa, TipoDispositivo))
|
||||
{
|
||||
GvDatosGPS.DataSource = ObjGPS.DtResultados;
|
||||
}
|
||||
}
|
||||
GvDatosGPS.DataBind();
|
||||
/*
|
||||
Dim ObjGPS As New ClsGPS
|
||||
If ObjGPS.DispositivosGet(-1, Estatus, CveCliente) Then
|
||||
GvDatosGPS.DataSource = ObjGPS.DtResultados
|
||||
Else
|
||||
GvDatosGPS.DataSource = Nothing
|
||||
End If
|
||||
ObjGPS.Dispose()
|
||||
GvDatosGPS.DataBind()
|
||||
UpDispositivos.Update()
|
||||
*/
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CveEstatus = DdlEstatus.SelectedValue.ToEntero();
|
||||
CveCliente = DdlCliente.SelectedValue.ToEntero(); CveCliente = CveCliente > 0 ? CveCliente : -1;
|
||||
TipoDispositivo = DdltipoDispositivo.SelectedValue.ToEntero();
|
||||
cargaDispositivos();
|
||||
}
|
||||
|
||||
protected void GvDatosGPS_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
{
|
||||
if (e.Row.RowType == DataControlRowType.DataRow)
|
||||
{
|
||||
e.Row.VerticalAlign = VerticalAlign.Middle;
|
||||
e.Row.FCLabel("Lblnumero").Text = (e.Row.RowIndex + 1).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user