Esempio n. 1
0
        public object GetOperAuthority([FromBody] JObject json)
        {
            string  res      = json.Value <string>("json").ToLower();
            dynamic dy       = JsonConvert.DeserializeObject <ExpandoObject>(res);
            string  userid   = dy.userid;
            string  moduleid = "b861d009-f570-4ffc-a666-d088a1aebd46";
            string  encode   = "add";

            OperatorProvider.AppUserId = userid;
            AuthorizeBLL authBLL       = new AuthorizeBLL();
            Boolean      OperAuthority = string.IsNullOrEmpty(authBLL.GetOperAuthority(OperatorProvider.Provider.Current(), moduleid, encode)) ? false : true;
            var          JsonData      = new
            {
                operauthority = OperAuthority
            };

            return(new { code = 0, info = "获取数据成功", data = JObject.Parse(JsonConvert.SerializeObject(JsonData)) });
        }
Esempio n. 2
0
 public object GetObsAddByUser([FromBody] JObject json)
 {
     try
     {
         string  res      = json.Value <string>("json");
         dynamic dy       = JsonConvert.DeserializeObject <ExpandoObject>(res);
         string  userid   = dy.userid;
         string  moduleid = "6cd3be4c-0232-46fb-bfc4-d550371beee5";
         string  encode   = "add";
         OperatorProvider.AppUserId = userid;
         AuthorizeBLL authBLL       = new AuthorizeBLL();
         Boolean      OperAuthority = string.IsNullOrEmpty(authBLL.GetOperAuthority(OperatorProvider.Provider.Current(), moduleid, encode)) ? false : true;
         var          JsonData      = new
         {
             operauthority = OperAuthority
         };
         return(new { code = 0, info = "获取数据成功", data = JObject.Parse(JsonConvert.SerializeObject(JsonData)) });
     }
     catch (Exception ex)
     {
         return(new { Code = -1, Count = 0, Info = ex.Message });
     }
 }
        public string GetOperAuthority(string enCode)
        {
            AuthorizeBLL authBLL = new AuthorizeBLL();

            return(authBLL.GetOperAuthority(OperatorProvider.Provider.Current(), Request.Cookies["currentmoduleId"].Value, enCode));
        }