Exemplo n.º 1
0
								public object Any(ServiceModel.Wms.Confirm_Imgr1 request)
								{
												CommonResponse ecr = new CommonResponse();
												ecr.initial();
												try
												{
																ServiceInterface.Wms.ConfirmService cs = new ServiceInterface.Wms.ConfirmService();
																cs.ConfirmImgr1(auth, request, confirm_Imgr1_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
												}
												catch (Exception ex) { cr(ecr, ex); }
												return ecr;
								}
Exemplo n.º 2
0
								public object Any(ServiceModel.Wms.List_Imgr2 request)
								{
												CommonResponse ecr = new CommonResponse();
												ecr.initial();
												try
												{
																ServiceInterface.Wms.TableService ls = new ServiceInterface.Wms.TableService();
																ls.List_Imgr2(auth, request, list_Imgr2_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
												}
												catch (Exception ex) { cr(ecr, ex); }
												return ecr;
								}
Exemplo n.º 3
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.º 4
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.º 5
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.º 6
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.º 7
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.º 8
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.º 9
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.º 10
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.º 11
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.º 12
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.º 13
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.º 14
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.º 15
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.º 16
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.º 17
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.º 18
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.º 19
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";
												}
								}
Exemplo n.º 20
0
 public object Post(ServiceModel.Event.Update_Done request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         ServiceInterface.Event.DoneService ds = new ServiceInterface.Event.DoneService();
         ds.initial(auth, request, update_Done_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
     }
     catch (Exception ex) { cr(ecr, ex); }
     return ecr;
 }
Exemplo n.º 21
0
								public object Get(ServiceModel.Freight.ViewPDF request)
								{
												if (this.Request.RawUrl.IndexOf("/pdf/file") > 0)
												{
																byte[] heByte = viewPDF_Logic.Get_File(request);																
																return new HttpResult(heByte, "application/pdf");
												}
												else //this.Request.RawUrl.IndexOf("/pdf") > 0
												{
																CommonResponse ecr = new CommonResponse();
																ecr.initial();
																try
																{
																				ServiceInterface.Freight.PdfService ps = new ServiceInterface.Freight.PdfService();
																				ps.PS_View(auth, request, viewPDF_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
																}
																catch (Exception ex) { cr(ecr, ex); }
																return ecr;
												}
								}
Exemplo n.º 22
0
 public object Any(ServiceModel.Freight.Freight_Login request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         ServiceInterface.Freight.LoginService ls = new ServiceInterface.Freight.LoginService();
         ls.initial(auth, request, freight_Login_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
     }
     catch (Exception ex) { cr(ecr, ex); }
     return ecr;
 }
Exemplo n.º 23
0
 private CommonResponse cr(CommonResponse ecr, Exception ex)
 {
     ecr.meta.code = 599;
     ecr.meta.message = "The server handle exceptions, the operation fails.";
     ecr.meta.errors.code = ex.GetHashCode();
     ecr.meta.errors.field = ex.HelpLink;
     ecr.meta.errors.message = ex.Message.ToString();
     return ecr;
 }
Exemplo n.º 24
0
 public object Get(ServiceModel.Freight.ViewFile request)
 {
     if (this.Request.RawUrl.IndexOf("/file/list") < 0 && !string.IsNullOrEmpty(request.eDoc) && !string.IsNullOrEmpty(request.Type))
                                         {
                                                         bool blnEDoc = false;
                                                         if (request.eDoc.Equals("1")) { blnEDoc = true; }
                                                         byte[] heByte = viewFile_Logic.Get_File(request, blnEDoc);
                                                         string type = "application/octet-stream";
                                                         if (request.Type.ToLower().Equals("img"))
                                                         {
                                                                         type = "image/jpeg";
                                                         }
                                                         else if (request.Type.ToLower().Equals("txt"))
                                                         {
                                                                         type = "text/plain";
                                                         }
                                                         else if (request.Type.ToLower().Equals("pdf"))
                                                         {
                                                                         type = "application/pdf";
                                                         }
                                                         return new HttpResult(heByte, type);
                                         }
                                         else
                                         {
                                                         CommonResponse ecr = new CommonResponse();
                                                         ecr.initial();
                                                         try
                                                         {
                                                                         ServiceInterface.Freight.FileService fs = new ServiceInterface.Freight.FileService();
                                                                         fs.FS_View(auth, request, viewFile_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
                                                         }
                                                         catch (Exception ex) { cr(ecr, ex); }
                                                         return ecr;
                                         }
 }
Exemplo n.º 25
0
 public object Get(ServiceModel.Freight.Tracking request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         ServiceInterface.Freight.TableService ls = new ServiceInterface.Freight.TableService();
         ls.TS_Tracking(auth, request, list_Tracking_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
     }
     catch (Exception ex) { cr(ecr, ex); }
     return ecr;
 }
Exemplo n.º 26
0
 public object Any(ServiceModel.Freight.Jmjm request)
 {
     CommonResponse ecr = new CommonResponse();
                                         ecr.initial();
                                         try
                                         {
                                                         ServiceInterface.Freight.TableService ts = new ServiceInterface.Freight.TableService();
                                                         ts.TS_Jmjm(auth, request, jmjm_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
                                         }
                                         catch (Exception ex) { cr(ecr, ex); }
                                         return ecr;
 }
Exemplo n.º 27
0
 public object Any(ServiceModel.Freight.UploadFile request)
 {
     CommonResponse ecr = new CommonResponse();
                                         ecr.initial();
                                         try
                                         {
                                                         ServiceInterface.Freight.FileService ps = new ServiceInterface.Freight.FileService();
                                                         if (this.Request.Files.Length > 0)
                                                         {
                                                                         request.RequestStream = this.Request.Files[0].InputStream;
                                                                         request.FileName = this.Request.Files[0].FileName;
                                                         }
                                                         ps.FS_Upload(auth, request, uploadImg_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
                                         }
                                         catch (Exception ex) { cr(ecr, ex); }
                                         return ecr;
 }
Exemplo n.º 28
0
 public object Get(ServiceModel.Event.List_Jmjm6 request)
 {
     CommonResponse ecr = new CommonResponse();
     ecr.initial();
     try
     {
         ServiceInterface.Event.ListService ls = new ServiceInterface.Event.ListService();
         ls.ListJmjm6(auth, request, list_Jmjm6_Logic, ecr, this.Request.Headers.GetValues("Signature"), this.Request.RawUrl);
     }
     catch (Exception ex) { cr(ecr, ex); }
     return ecr;
 }