104 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C#
		
	
	
	
		
		
			
		
	
	
			104 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			C#
		
	
	
	
| 
								 | 
							
								using System;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								using System.Collections.Generic;
							 | 
						|||
| 
								 | 
							
								using System.ComponentModel;
							 | 
						|||
| 
								 | 
							
								using System.Data;
							 | 
						|||
| 
								 | 
							
								using System.Drawing;
							 | 
						|||
| 
								 | 
							
								using System.Text;
							 | 
						|||
| 
								 | 
							
								using System.Windows.Forms;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								namespace DeiNiu.Wms.CE
							 | 
						|||
| 
								 | 
							
								{
							 | 
						|||
| 
								 | 
							
								    public partial class FlowNoQuery : basicForm
							 | 
						|||
| 
								 | 
							
								    {
							 | 
						|||
| 
								 | 
							
								        public FlowNoQuery()
							 | 
						|||
| 
								 | 
							
								        {
							 | 
						|||
| 
								 | 
							
								            setTitle();
							 | 
						|||
| 
								 | 
							
								            InitializeComponent();
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        //public void clear()
							 | 
						|||
| 
								 | 
							
								        //{
							 | 
						|||
| 
								 | 
							
								          
							 | 
						|||
| 
								 | 
							
								        //    label3.Text = "";
							 | 
						|||
| 
								 | 
							
								        //}
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								        private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
							 | 
						|||
| 
								 | 
							
								        {
							 | 
						|||
| 
								 | 
							
								            if(e.KeyChar==13)
							 | 
						|||
| 
								 | 
							
								            {
							 | 
						|||
| 
								 | 
							
								                string code = "";
							 | 
						|||
| 
								 | 
							
								                code = textBox1.Text.ToString();
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                textBox1.Text = "";
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                textBox1.Focus();
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								               
							 | 
						|||
| 
								 | 
							
								                DataTable dt = null; 
							 | 
						|||
| 
								 | 
							
								                Cursor.Current = System.Windows.Forms.Cursors.WaitCursor;
							 | 
						|||
| 
								 | 
							
								                try
							 | 
						|||
| 
								 | 
							
								                {
							 | 
						|||
| 
								 | 
							
								                    dt = client.getFlowDetails(code, LoginInfo.UserId, LoginInfo.Token);
							 | 
						|||
| 
								 | 
							
								                }
							 | 
						|||
| 
								 | 
							
								                catch (Exception er)
							 | 
						|||
| 
								 | 
							
								                {
							 | 
						|||
| 
								 | 
							
								                    Cursor.Current = System.Windows.Forms.Cursors.Default;
							 | 
						|||
| 
								 | 
							
								                    showErrorMsg(er);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                    return;
							 | 
						|||
| 
								 | 
							
								                }
							 | 
						|||
| 
								 | 
							
								                Cursor.Current = System.Windows.Forms.Cursors.Default;  
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                if(dt.Rows.Count==0)
							 | 
						|||
| 
								 | 
							
								                {
							 | 
						|||
| 
								 | 
							
								                    lbTaskNo.Text = "";
							 | 
						|||
| 
								 | 
							
								                    dataGrid1.DataSource = null;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                    
							 | 
						|||
| 
								 | 
							
								                    return;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                }
							 | 
						|||
| 
								 | 
							
								                 
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                lbTaskNo.Text=dt.Rows[0]["任务"].ToString();
							 | 
						|||
| 
								 | 
							
								                lbType.Text = dt.Rows[0]["类型"].ToString();
							 | 
						|||
| 
								 | 
							
								                lbPartion.Text = dt.Rows[0]["任务区"].ToString();
							 | 
						|||
| 
								 | 
							
								                this.lbStatus.Text = dt.Rows[0]["状态"].ToString();
							 | 
						|||
| 
								 | 
							
								                this.lbEmployee.Text = dt.Rows[0]["负责人"].ToString();
							 | 
						|||
| 
								 | 
							
								                this.lbTaskCnt.Text = dt.Rows[0]["数量"].ToString();
							 | 
						|||
| 
								 | 
							
								             
							 | 
						|||
| 
								 | 
							
								                 
							 | 
						|||
| 
								 | 
							
								                /*
							 | 
						|||
| 
								 | 
							
								                DataGridTableStyle ds = new DataGridTableStyle();
							 | 
						|||
| 
								 | 
							
								                ds.MappingName = dt.TableName;
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles.Add(ds);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["货位"].Width = 70;
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["批号"].Width = 80;
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["数量"].Width = 50; 
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["厂家"].Width = 150;
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["商品"].Width = 0;
							 | 
						|||
| 
								 | 
							
								                dataGrid1.TableStyles[0].GridColumnStyles["条码"].Width = 0;
							 | 
						|||
| 
								 | 
							
								                */
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                DataTable dt1 = client.getTaskDetails(lbTaskNo.Text, LoginInfo.UserId, LoginInfo.Token);
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								                dataGrid1.DataSource = dt1;
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								            }
							 | 
						|||
| 
								 | 
							
								        }
							 | 
						|||
| 
								 | 
							
								         
							 | 
						|||
| 
								 | 
							
								
							 | 
						|||
| 
								 | 
							
								       
							 | 
						|||
| 
								 | 
							
								    }
							 | 
						|||
| 
								 | 
							
								}
							 |