예제 #1
0
        private void OcultarSubMenu()
        {
            var m = (Principal)this.Master;

            ProxyUsuario.UsuarioBE Usuario = (ProxyUsuario.UsuarioBE)Session["USUARIO"];
            if (Usuario != null)
            {
                if (Usuario.PERFIL == "G")
                {
                    m.FindControl("li_RegistroGastos").Visible = false;
                }
            }
        }
        private List <PresupuestoBE> ListarGastosExcedidos()
        {
            ProxyUsuario.UsuarioBE Usuario = (ProxyUsuario.UsuarioBE)Session["USUARIO"];
            HttpWebRequest         req     = (HttpWebRequest)WebRequest.Create("http://localhost:50534/GastoExcedidoSrv.svc/GastosExcedidos/" + Usuario.CENTROGESTORID + "/" + ddlAño.SelectedValue + "/" + ddlMes.SelectedValue);

            req.Method = "GET";
            HttpWebResponse      res        = (HttpWebResponse)req.GetResponse();
            StreamReader         reader     = new StreamReader(res.GetResponseStream());
            string               gastoJson  = reader.ReadToEnd();
            JavaScriptSerializer js         = new JavaScriptSerializer();
            List <PresupuestoBE> gastolista = js.Deserialize <List <PresupuestoBE> >(gastoJson);

            return(gastolista);
        }
예제 #3
0
 private void CargarGrilla()
 {
     ProxyPresupuesto.PresupuestoSrvClient proxy = new ProxyPresupuesto.PresupuestoSrvClient();
     ProxyUsuario.UsuarioBE Usuario = (ProxyUsuario.UsuarioBE)Session["USUARIO"];
     if (proxy != null && Usuario != null)
     {
         gvPresupuesto.DataSource = proxy.ConsultarPresupuestoDispo(Usuario.CENTROGESTORID, int.Parse(ddlAño.SelectedValue), ddlMes.SelectedValue);
         gvPresupuesto.DataBind();
         if (gvPresupuesto.Rows.Count == 0)
         {
             ScriptManager.RegisterStartupScript(this, Page.GetType(), "popup", "alert('No hay presupuestos disponibles para este año y mes.');", true);
         }
     }
 }