示例#1
0
        private void btnNext1_Click(object sender, EventArgs e)
        {
            int i = (int)mss.data.sortingType;

            if (mssrow == mss.data.pickOperateSecondarySortingRFDTOS.Count - 1)
            {
                try
                {
                    string x = HttpHelper.HttpPost("startSecondarySorting", @"trayCode=" + mss.data.trayCode + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode);
                    msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                    if (msg == null)
                    {
                        throw new Exception("错误信息捕捉失败");
                    }
                    if (!msg.success)
                    {
                        throw new Exception(msg.msg);
                    }
                    mss = (Model.MstartSecondarySorting)JsonConvert.DeserializeObject(x, typeof(Model.MstartSecondarySorting));
                    if (mss == null)
                    {
                        throw new Exception("数据信息捕捉失败");
                    }
                    mss.data.sortingType = i;
                    //this.labstockUpConfirmMsg.Text = v.data.stockUpConfirmMsg;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);

                    return;
                }
                frmStockOut_Load(null, null);
                return;
            }
            mssrow++;
            while (true)
            {
                int cqty = mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pickQuantity;
                int mqty = mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pickMinQuantity;
                if (isqie)
                {
                    cqty = mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pickOrderQuantity;
                    mqty = mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pickOrderMinQuantity;
                }
                if (cqty == 0 && mqty == 0)
                {
                    mssrow++;
                }
                else
                {
                    break;
                }
                if (mssrow == mss.data.pickOperateSecondarySortingRFDTOS.Count)
                {
                    try
                    {
                        string x = HttpHelper.HttpPost("startSecondarySorting", @"trayCode=" + mss.data.trayCode + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode);
                        msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                        if (msg == null)
                        {
                            throw new Exception("错误信息捕捉失败");
                        }
                        if (!msg.success)
                        {
                            throw new Exception(msg.msg);
                        }
                        mss = (Model.MstartSecondarySorting)JsonConvert.DeserializeObject(x, typeof(Model.MstartSecondarySorting));
                        if (mss == null)
                        {
                            throw new Exception("数据信息捕捉失败");
                        }
                        mss.data.sortingType = i;
                        //this.labstockUpConfirmMsg.Text = v.data.stockUpConfirmMsg;
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);

                        return;
                    }
                    frmStockOut_Load(null, null);
                    return;
                }
            }
            ShowHead();
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                getSecondarySortingInfo();
                Cursor.Current = Cursors.Default;
                ShowBody();
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                //this.txttraycode.SelectAll();
                return;
            }
            Init();
        }
示例#2
0
 private void txttraycode_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar != 13)
     {
         return;
     }
     //this.txtorderid.Text = this.txtorderid.Text.Trim();
     if (this.txttraycode.Text == "")
     {
         return;
     }
     Model.MstartSecondarySorting v = null;
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         string x = HttpHelper.HttpPost("startSecondarySorting", @"trayCode=" + this.txttraycode.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode);
         msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
         if (msg == null)
         {
             throw new Exception("错误信息捕捉失败");
         }
         if (!msg.success)
         {
             throw new Exception(msg.msg);
         }
         v = (Model.MstartSecondarySorting)JsonConvert.DeserializeObject(x, typeof(Model.MstartSecondarySorting));
         if (v == null)
         {
             throw new Exception("数据信息捕捉失败");
         }
         //this.labstockUpConfirmMsg.Text = v.data.stockUpConfirmMsg;
         Cursor.Current = Cursors.Default;
     }
     catch (Exception ex)
     {
         Cursor.Current = Cursors.Default;
         MessageBox.Show(ex.Message);
         this.txttraycode.SelectAll();
         return;
     }
     if (v.data.pickType == 0 && v.data.checkType == 1)
     {
         frmNStockOutMaterial frm = new frmNStockOutMaterial();
         frm.mss = v;
         frm.ShowDialog();
     }
     else if (v.data.sortingType == 1 || v.data.sortingType == 2 || v.data.sortingType == 3)
     {
         frmNStockOut frm = new frmNStockOut();
         frm.mss = v;
         frm.ShowDialog();
     }
     else
     {
         frmStockOutCheck frm = new frmStockOutCheck();
         frm.mss = v;
         frm.ShowDialog();
     }
     this.txttraycode.Focus();
     this.txttraycode.SelectAll();
 }