Exemple #1
0
 public void ListJobNo(Auth auth, List_JobNo request, List_JobNo_Logic list_JobNo_Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         List<job> JobList = new List<job>();
         HashSet<string> hsResult = list_JobNo_Logic.GetList(request);
         if (hsResult.Count > 0)
         {
             ecr.meta.code = 200;
             ecr.meta.message = "OK";
         }
         else
         {
             ecr.meta.code = 612;
             ecr.meta.message = "The specified resource does not exist";
         }
         foreach (string strJobNo in hsResult)
         {
             job j = new job();
             j.JobNo = strJobNo;
             j.ContainerCounts = list_JobNo_Logic.GetCount(request.PhoneNumber, strJobNo).ToString();
             JobList.Add(j);
         }
         ecr.data.results = JobList;
     }
     else
     {
         ecr.meta.code = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
Exemple #2
0
 public object Any(List_Login request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         LoginService ls = new LoginService();
         ls.initial(auth, request, list_Login_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;
 }
Exemple #3
0
 public void initial(Auth auth, Update_Done request, Update_Done_Logic eventdoneLogic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         if (eventdoneLogic.UpdateDone(request) > 0)
         {
             eventdoneLogic.InsertContainerNo(request);
             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 #4
0
 public void ListJmjm6(Auth auth, List_Jmjm6 request, List_Jmjm6_Logic list_Jmjm6_Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         ecr.data.results = list_Jmjm6_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";
     }
 }