Пример #1
0
 public IActionResult ActionResult([FromForm] string usersysid)
 {
     if (GetUserLoginState.LoginState(Request.Headers))
     {
         MResList resList = new MResList();
         return(Ok(resList.GetResList(usersysid)));
     }
     else
     {
         return(Ok(-1));
     }
 }
Пример #2
0
 public IActionResult ActionResult()
 {
     if (GetUserLoginState.LoginState(Request.Headers))
     {
         string   empid      = JsonConvert.DeserializeObject <JObject>(Request.Headers["token"]).GetValue("UserEmpID").ToString();
         MResList resList    = new MResList();
         string   defresname = resList.GetDefaultRes(empid);
         if (string.IsNullOrWhiteSpace(defresname))
         {
             return(Ok(-1));
         }
         else
         {
             return(Ok(defresname));
         }
     }
     else
     {
         return(Ok(-1));
     }
 }