예제 #1
0
 /// <summary>
 /// 根据主键ID获取信息
 /// </summary>
 /// <returns></returns>
 public JsonResponses GetInfo(int id)
 {
     try
     {
         RequestBase request = RequestBase.Get.Clone() as RequestBase;
         request.SetValue("id", id.ToString());
         request.Url = GetInfoUrl;
         return(sdkUtil.PostForVo(request));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
     return(JsonResponses.Failed);
 }
예제 #2
0
 /// <summary>
 /// 平台账号注册
 /// </summary>
 /// <param name="loginInfo"></param>
 /// <returns></returns>
 public JsonResponses RegisterPlatfrom(RegisterPlatformForm registerPlatform)
 {
     try
     {
         RequestBase request = RequestBase.PostForm.Clone() as RequestBase;
         request.Url = RegisterPlatfromUrl;
         request.SetValue("username", registerPlatform.UserName);
         request.SetValue("password", registerPlatform.Password);
         request.SetValue("userNo", registerPlatform.UserNo);
         request.SetValue("phone", registerPlatform.Phone);
         request.SetValue("email", registerPlatform.Email);
         request.SetValue("inputUser", registerPlatform.InputUser);
         request.SetValue("platformNo", registerPlatform.PlatformNo);
         return(sdkUtil.PostForVo(request));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
         return(JsonResponses.Failed);
     }
 }
예제 #3
0
 /// <summary>
 /// 登录
 /// </summary>
 /// <param name="loginInfo"></param>
 /// <returns></returns>
 public JsonResponses Login(LoginInfoForm loginInfo)
 {
     try
     {
         RequestBase request = RequestBase.PostForm.Clone() as RequestBase;
         request.Url = LoginUrl;
         request.SetValue("userName", loginInfo.UserName);
         request.SetValue("password", loginInfo.Password);
         request.SetValue("loginerInfo", loginInfo.LoginerInfo);
         request.SetValue("platform", loginInfo.Platform);
         return(sdkUtil.PostForVo(request));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
         return(JsonResponses.Failed);
     }
 }
예제 #4
0
 /// <summary>
 /// 获取用户角色列表
 /// </summary>
 /// <param name="userNo"></param>
 /// <returns></returns>
 public JsonResponses GetRolesAssign(long UserNo)
 {
     try
     {
         RequestBase request = RequestBase.Get.Clone() as RequestBase;
         request.Url = GetRolesAssignUrl;
         request.SetValue("userNo", UserNo);
         return(sdkUtil.PostForVo(request));
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.ToString());
     }
     return(JsonResponses.Failed);
 }