Пример #1
0
        new public void Dispose()
        {
            if (proxy != null)
            {
                if (proxy.State != System.ServiceModel.CommunicationState.Closed)
                {
                    proxy.Close();
                }
            }

            proxyRole = new SoftvService.RoleClient();
            if (proxyRole != null)
            {
                if (proxyRole.State != System.ServiceModel.CommunicationState.Closed)
                {
                    proxyRole.Close();
                }
            }

            proxyModule = new SoftvService.ModuleClient();
            if (proxyModule != null)
            {
                if (proxyModule.State != System.ServiceModel.CommunicationState.Closed)
                {
                    proxyModule.Close();
                }
            }
        }
Пример #2
0
        public PermisoController()
        {
            proxy = new SoftvService.PermisoClient();

            proxyRole = new SoftvService.RoleClient();

            proxyModule = new SoftvService.ModuleClient();
        }
Пример #3
0
 public BaseController()
 {
     RemoteIp = System.Web.HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
     if (string.IsNullOrEmpty(RemoteIp))
     {
         RemoteIp = System.Web.HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
     }
     else
     {
         RemoteIp = "Undefined";
     }
     if (System.Web.HttpContext.Current.Session["username"] != null)
     {
         LoggedUserName = int.Parse(System.Web.HttpContext.Current.Session["idusuario"].ToString());
     }
     else
     {
         LoggedUserName = 0;
     }
     proxy        = new SoftvService.ModuleClient();
     proxyPermiso = new SoftvService.PermisoClient();
     proxyUsuario = new SoftvService.UsuarioClient();
     proxyRol     = new SoftvService.RoleClient();
 }