200 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			200 lines
		
	
	
		
			6.4 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | ||
| using System.Collections.Generic;
 | ||
| using System.ComponentModel;
 | ||
| using System.Data;
 | ||
| using System.Drawing;
 | ||
| using System.Text;
 | ||
| using System.Linq;
 | ||
| using System.Windows.Forms;
 | ||
| using DevExpress.XtraBars;
 | ||
| using DeiNiu.wms.win.ServiceReferenceStockLocation;
 | ||
| using DeiNiu.Utils;
 | ||
| using DeiNiu.wms.win.ServiceReferenceStockOutPickRequest;
 | ||
| using DeiNiu.wms.win.ServiceReferencePortal;
 | ||
| using DeiNiu.wms.win.ServiceReferenceStockInRequest;
 | ||
| using DeiNiu.wms.win.ServiceReferenceMobileTest;
 | ||
| namespace DeiNiu.wms.win
 | ||
| {
 | ||
|     public partial class testWcf : BasicRibbonForm
 | ||
|     {
 | ||
|         public testWcf()
 | ||
|         {
 | ||
|             InitializeComponent();
 | ||
|         }
 | ||
|         DeiNiu.wms.win.ServiceReferenceMobileTest.MobileClient client = new MobileClient();
 | ||
|         private void simpleButton1_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton2_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|          
 | ||
|             {
 | ||
|                 bool result = client.finishBatchPickItem("PICK060000073039", 1, LoginInfo.UserId, LoginInfo.Token);
 | ||
|                 MessageBox.Show(result ? "pass" : "failure");
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton3_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|        
 | ||
|             {
 | ||
|                 string[] auths = client.getPortAuths(LoginInfo.UserId, LoginInfo.Token);
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton4_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|           
 | ||
|             {
 | ||
|                 bool result = client.finishBatchValidateItem("PICK060000072976", 3, LoginInfo.UserId, LoginInfo.Token);
 | ||
|                 MessageBox.Show(result ? "pass" : "failure");
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton5_Click(object sender, EventArgs e)
 | ||
|         { 
 | ||
|            
 | ||
|             {
 | ||
|                DataTable result = client.getBatchPickOrders4Valid();
 | ||
|                 MessageBox.Show(result.Rows.Count > 0 ? "pass" : "failure");
 | ||
|             }
 | ||
|         
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton6_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             
 | ||
|             {
 | ||
|                 int cnt = client.batchPickCount4Valid("PICK060000073039");
 | ||
|                 MessageBox.Show(cnt== 0 ? "pass" : "failure");
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton7_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             
 | ||
|             {
 | ||
|                 DataTable result = client.repTodayDetails4Pick();
 | ||
|                 MessageBox.Show(result.Rows.Count > 0 ? "pass" : "failure");
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton8_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             
 | ||
|             {
 | ||
|                 try
 | ||
|                 {
 | ||
|                     DataTable result = client.getLocations("G309VFCSU9V", "20161218", 320); //这里出现wcf datatable 序列化错误, 原因是自己构造的datatable 没有命名
 | ||
|                     MessageBox.Show(result.Rows.Count == 0 ? "pass" : "failure");
 | ||
|                 }
 | ||
|                 catch ( Exception er){
 | ||
| 
 | ||
|                     MessageBox.Show(er.Message);
 | ||
|                 }
 | ||
| 
 | ||
|                    
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton9_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             
 | ||
|             {
 | ||
|                 try 
 | ||
|                 {
 | ||
|                     enumRepResult result =(enumRepResult) client.repItemIn("2b10011-31", "G309VFCSU9V", "20161221", 320, 2, LoginInfo.UserId, LoginInfo.Token);
 | ||
|                     MessageBox.Show(result.ToString());
 | ||
|                 }
 | ||
|                 catch (Exception er)
 | ||
|                 {
 | ||
| 
 | ||
|                     MessageBox.Show(er.Message);
 | ||
|                 }
 | ||
| 
 | ||
| 
 | ||
|             }
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton10_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|            // enumRepResult result = (enumRepResult)client.upDownStockLocation("2B10207-15", "G1XJI1231NV", "16070122", 140, (int)enumStockRecordType.手持下架, LoginInfo.UserId, LoginInfo.Token, -1);
 | ||
|  
 | ||
|             enumRepResult result2 = (enumRepResult)client.upDownStockLocation("2d8408-11", "G1WJONX42RF", "170101", 100, (int)enumStockRecordType.手持下架, LoginInfo.UserId, LoginInfo.Token, -1);
 | ||
| 
 | ||
|             MessageBox.Show(result2.ToString());
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton11_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             DataTable dt = client.getData4Maintain("2d10003-32").Tables[0];
 | ||
|             MessageBox.Show("待维护数量:"+dt.Rows.Count);
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton12_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             bool res = client.newMaintain(4, 490, 0, "test1,test2,test3", LoginInfo.UserId, LoginInfo.Token);
 | ||
|             MessageBox.Show(res?"success":"fail");
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton13_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             bool res = client.fixIssueData("2B0101-11", "", "", LoginInfo.UserId, LoginInfo.Token);
 | ||
|             MessageBox.Show(res ? "success" : "fail");
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton14_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             DataTable dt = client.getIssueData("");
 | ||
|             MessageBox.Show("issuedata:" + dt.Rows.Count);
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton122_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton15_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             enumRepResult result2 = (enumRepResult)client.upDownStockLocation("2B50022-25", "G1WH2OFHGY3", "16061328", 100, (int)enumStockRecordType.初始盘点, LoginInfo.UserId, LoginInfo.Token, -1);
 | ||
| 
 | ||
|             MessageBox.Show(result2.ToString());
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton1_Click_1(object sender, EventArgs e)
 | ||
|         {
 | ||
|             DataTable dt = client.getTransRequestsBulks("TRAN080000087491");
 | ||
|             MessageBox.Show("trans:" + dt.Rows.Count);
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton16_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             bool rs =    client.pickBulks("TRAN080000087491",8, LoginInfo.UserId, LoginInfo.Token);
 | ||
| 
 | ||
|             MessageBox.Show("pick bulks ok?:" + rs);
 | ||
| 
 | ||
| 
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton17_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             DataTable dt = client.getTransRequestsByStatus(0);
 | ||
|             MessageBox.Show("trans:" + dt.Rows.Count);
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton18_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             
 | ||
|          
 | ||
|         }
 | ||
| 
 | ||
|         private void simpleButton19_Click(object sender, EventArgs e)
 | ||
|         {
 | ||
|             DataTable dt = client.getTransRequestsDetail("TRAN080000087491", 0);
 | ||
|             MessageBox.Show("trans:" + dt.Rows.Count);
 | ||
|         }
 | ||
|     }
 | ||
| } |