Exemplo n.º 1
0
 public void FS_Upload(Auth auth, UploadFile request, UploadFile_Logic logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
                                         {
                                                         ecr.data.results = logic.upload(request);
                                                         ecr.meta.code = 200;
                                                         ecr.meta.message = "OK";
                                         }
                                         else
                                         {
                                                         ecr.meta.code = 401;
                                                         ecr.meta.message = "Unauthorized";
                                         }
 }
Exemplo n.º 2
0
        public void initial(Auth auth, Update_Done request, Update_Done_Logic eventdoneLogic, CommonResponse ecr, string[] token, string uri)
        {
            if (auth.AuthResult(token, uri))
            {
																ecr.data.results = eventdoneLogic.UpdateDone(request);
                ecr.meta.code = 200;
                ecr.meta.message = "OK";
            }
            else
            {
                ecr.meta.code = 401;
                ecr.meta.message = "Unauthorized";
            }
        }
Exemplo n.º 3
0
        public void initial(Auth auth, Freight_Login request, Freight_Login_Logic loginLogic, CommonResponse ecr, string[] token, string uri)
        {
            if (auth.AuthResult(token, uri))
            {
																ecr.data.results = loginLogic.LoginCheck(request);
                ecr.meta.code = 200;
                ecr.meta.message = "OK";
            }
            else
            {
                ecr.meta.code = 401;
                ecr.meta.message = "Unauthorized";
            }
        }
Exemplo n.º 4
0
 public void List_Imgr1(Auth auth, List_Imgr1 request, List_Imgr1_Logic list_Imgr1_Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         ecr.data.results = list_Imgr1_Logic.GetList(request);
         ecr.meta.code = 200;
         ecr.meta.message = "OK";                
     }
     else
     {
         ecr.meta.code = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
Exemplo n.º 5
0
								public void List_Rcbp1(Auth auth, List_Rcbp1 request, List_Rcbp1_Logic list_Rcbp1_Logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/wms/rcbp1") > 0)
																{
																				ecr.data.results = list_Rcbp1_Logic.GetList(request);
																}
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 6
0
 public void FS_View(Auth auth, ViewFile request, ViewFile_Logic logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
                                         {
                                                         if (uri.IndexOf("/file/list") > 0)
                                                         {
                                                                         ecr.data.results = logic.Get_List(request);
                                                         }
                                                         ecr.meta.code = 200;
                                                         ecr.meta.message = "OK";
                                         }
                                         else
                                         {
                                                         ecr.meta.code = 401;
                                                         ecr.meta.message = "Unauthorized";
                                         }
 }
Exemplo n.º 7
0
								public void TS_Jmjm(Auth auth, Jmjm request, Jmjm_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/jmjm1/sps") > 0)
																{
																				ecr.data.results = logic.Get_JobContainer_SpsList(request);
																}																
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 8
0
 public void TS_Rcbp(Auth auth, Rcbp request, Rcbp_Logic logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
                                                         if (uri.IndexOf("/freight/rcbp1/sps") > 0)
                                                         {
                                                                         ecr.data.results = logic.Get_Rcbp1_SpsList(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp1/read") > 0)
                                                         {
                                                                         ecr.data.results = logic.Get_Rcbp1_List(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp1/update") > 0)
                                                         {
                                                                         ecr.data.results = logic.Update_Rcbp1(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp3/read") > 0)
                                                         {
                                                                         ecr.data.results = logic.Read_Rcbp3_List(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp3/create") > 0)
                                                         {
                                                                         ecr.data.results = logic.Insert_Rcbp3(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp3/update") > 0)
                                                         {
                                                                         ecr.data.results = logic.Update_Rcbp3(request);
                                                         }
                                                         else if (uri.IndexOf("/freight/rcbp3/delete") > 0)
                                                         {
                                                                         ecr.data.results = logic.Delete_Rcbp3(request);
                                                         }
                                                         else
                                                         {
                                                                         ecr.data.results = -1;
                                                         }
         ecr.meta.code = 200;
         ecr.meta.message = "OK";
     }
     else
     {
         ecr.meta.code = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
Exemplo n.º 9
0
								public void TS_Sibl(Auth auth, Sibl request, Sibl_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/sibl2/list") > 0)
																{
																				ecr.data.results = logic.Get_Sibl2_List(request);
																}
																else if (uri.IndexOf("/sibl2/update") > 0)
																{
																				ecr.data.results = logic.Update_Sibl2(request);
																}
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 10
0
 public void ConfirmImgr1(Auth auth, Confirm_Imgr1 request, Confirm_Imgr1_Logic confirmImgr1Logic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         if (confirmImgr1Logic.Confirm(request) > -1)
         {
             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";
     }
 }
Exemplo n.º 11
0
								public void TS_Plvi(Auth auth, Plvi request, Plvi_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/plvi1/sps") > 0)
																{
																				ecr.data.results = logic.Get_Plvi1_SpsList(request);
																}
																else if (uri.IndexOf("/plvi1/update") > 0)
																{
																				ecr.data.results = logic.Update_Plvi1(request);
																}
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 12
0
								public void TS_Smct(Auth auth, Smct request, Smct_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/smct1/sps") > 0)
																{
																				ecr.data.results = logic.Get_Smct1_SpsList(request);
																}
																else if (uri.IndexOf("/smct2") > 0)
																{
																				ecr.data.results = logic.Get_Smct2_List(request);
																}																	
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 13
0
 public void initial(Auth auth, Wms_Login request, Wms_Login_Logic loginLogic, CommonResponse ecr, string[] token, string uri)
 {
     if (auth.AuthResult(token, uri))
     {
         if (loginLogic.LoginCheck(request) > 0)
         {
             ecr.meta.code = 200;
             ecr.meta.message = "OK";
             ecr.data.results = request.UserId;
         }
         else
         {
             ecr.meta.code = 612;
             ecr.meta.message = "Invalid User";
         }
     }
     else
     {
         ecr.meta.code = 401;
         ecr.meta.message = "Unauthorized";
     }
 }
Exemplo n.º 14
0
 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";
     }
 }
Exemplo n.º 15
0
								public void TS_Smsa(Auth auth, Smsa request, Smsa_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/smsa1/count") > 0)
																{
																				ecr.data.results = logic.GetCount(request);
																}
																else if (uri.IndexOf("/smsa1/sps") > 0)
																{
																				ecr.data.results = logic.GetSpsList(request);
																}
																else if (uri.IndexOf("/smsa2/create") > 0)
																{
																				ecr.data.results = logic.Insert_Smsa2(request);
																}
																else if (uri.IndexOf("/smsa2/update") > 0)
																{
																				ecr.data.results = logic.Update_Smsa2(request);
																}
																else if (uri.IndexOf("/smsa2/read") > 0)
																{
																				ecr.data.results = logic.Read_Smsa2(request);
																}
																else if (uri.IndexOf("/smsa2/delete") > 0)
																{
																}
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}
Exemplo n.º 16
0
        public void TS_Tracking(Auth auth, Tracking request, Tracking_Logic logic, CommonResponse ecr, string[] token, string uri)
        {
            if (auth.AuthResult(token, uri))
            {
																if (uri.IndexOf("/tracking/OrderNo") > 0)
																{
																				ecr.data.results = logic.GetOmtx1List(request);
																}
																else if (uri.IndexOf("/tracking/sps") > 0)
																{
																				ecr.data.results = logic.GetSpsList(request);
																}
																else if (uri.IndexOf("/tracking/count") > 0)
																{
																				ecr.data.results = logic.GetCount(request);
																}																
																else
																{
																				ecr.data.results = logic.GetList(request);
																}
                ecr.meta.code = 200;
                ecr.meta.message = "OK";
            }
            else
            {
                ecr.meta.code = 401;
                ecr.meta.message = "Unauthorized";
            }
        }
Exemplo n.º 17
0
        public void TS_Saus(Auth auth, Saus request, Saus_Logic logic, CommonResponse ecr, string[] token, string uri)
								{
												if (auth.AuthResult(token, uri))
												{
																if (uri.IndexOf("/memo") > 0)
																{
																				ecr.data.results = logic.GetMemo(request);
																}
																else if (uri.IndexOf("/update/memo") > 0)
																{
																				ecr.data.results = logic.Update_Memo(request);
																}
																ecr.meta.code = 200;
																ecr.meta.message = "OK";
												}
												else
												{
																ecr.meta.code = 401;
																ecr.meta.message = "Unauthorized";
												}
								}