public void List_Imgr2(Auth auth, List_Imgr2 request, List_Imgr2_Logic list_Imgr2_Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         ecr.data.results = list_Imgr2_Logic.GetList(request);
         if (ecr.data.results != null)
         {
             ecr.meta.code    = 200;
             ecr.meta.message = "OK";
         }
         else
         {
             ecr.meta.code    = 612;
             ecr.meta.message = "The specified resource does not exist";
         }
     }
     else
     {
         ecr.meta.code    = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
 public void List_Imgr2(Auth auth, List_Imgr2 request, List_Imgr2_Logic list_Imgr2_Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         ecr.data.results = list_Imgr2_Logic.GetList(request);
         if (ecr.data.results != null)
         {
             ecr.meta.code = 200;
             ecr.meta.message = "OK";
         }
         else
         {
             ecr.meta.code = 612;
             ecr.meta.message = "The specified resource does not exist";
         }
     }
     else
     {
         ecr.meta.code = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
Exemple #3
0
 public object Any(List_Imgr2 request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         ListService ls = new ListService();
         ls.ListImgr2(auth, request, list_Imgr2_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
     }
     catch (Exception ex)
     {
         ecr.meta.code = 599;
         ecr.meta.message = "The server handle exceptions, the operation fails.";
         ecr.meta.errors.code = ex.HResult;
         ecr.meta.errors.field = ex.HelpLink;
         ecr.meta.errors.message = ex.Message.ToString();
     }
     return ecr;
 }