Ejemplo n.º 1
0
 public IHttpActionResult GetPersonelOfMenuData(object ParentMenu)
 {
     try
     {
         JObject JsonObject = JObject.Parse(ParentMenu.ToString());
         Bis.AccessLevelMethod    BisAccessLevel = new Bis.AccessLevelMethod();
         ViewModel.tblAccessLevel GetAccessLevel = JsonObject.ToObject <ViewModel.tblAccessLevel>();
         GetAccessLevel.MenuUrl = GetAccessLevel.MenuUrl.Replace(GetAccessLevel.MenuUrl.Split('/')[0] + "/" + GetAccessLevel.MenuUrl.Split('/')[1] + "/" + GetAccessLevel.MenuUrl.Split('/')[2] + "/", "");
         JArray PersonelOfMenu = BisAccessLevel.GetJsonDataForEventUser(GetAccessLevel);
         return(Ok(PersonelOfMenu));
     }
     catch
     {
         return(NotFound());
     }
 }
Ejemplo n.º 2
0
 public IHttpActionResult FillSubMenu(object ParentMenu)
 {
     try
     {
         JObject JsonObject = JObject.Parse(ParentMenu.ToString());
         Bis.AccessLevelMethod BisAccessLevel = new Bis.AccessLevelMethod();
         ViewModel.Search      AccessSearch   = new ViewModel.Search();
         AccessSearch.Filter     = " And IDUser = '******'  AND tblAccessLevel.Access='True' AND tblMenu.ParentID = '" + JsonObject["IDParent"].ToString() + "'";
         AccessSearch.Order      = " order by tblMenu.[Order] Asc";
         AccessSearch.JsonResult = " FOR JSON AUTO";
         JArray JsonAccessLevel = BisAccessLevel.GetJsonAccessLevelDataForTree(AccessSearch);
         return(Ok(JsonAccessLevel));
     }
     catch
     {
         return(NotFound());
     }
 }