Esempio n. 1
0
        void getNewOrder(string shippercode)
        {
            string con = @"shipperCode=" + shippercode + "&lcCode=" + Comm.lcCode + "&orderType=" + this.cmbordertype.SelectedValue.ToString() + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode + "&oid=" + this.txtorder.Text;

            if (this.cmbbusinessType.Text != "")
            {
                con += "&transportMethod=" + this.cmbbusinessType.SelectedValue.ToString();
            }
            string x = HttpHelper.HttpPost("createStockInNoOrder", con);

            //msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            //if (msg == null)
            //    throw new Exception("错误信息捕捉失败");
            //if (!msg.success)
            //    throw new Exception(msg.msg);
            Model.Mccode m = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
            if (m == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (m.data == "")
            {
                throw new Exception("没有该对应的单据");
            }

            ccode = m.data;
        }
Esempio n. 2
0
        private void frmBalTranMove_Load(object sender, EventArgs e)
        {
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("getZcqSlList", "&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);
                }
                mz = (Model.MZcqSlList)JsonConvert.DeserializeObject(x, typeof(Model.MZcqSlList));
                //var v = from q in mz.data where q.status == "EFFECTIVE" select q;
                List <Model.zcq> zcql = new List <Rf_Wms.Model.zcq>();
                foreach (Model.zcq v in mz.data)
                {
                    if (v.status == "EFFECTIVE")
                    {
                        zcql.Add(v);
                    }
                }
                if (zcql.Count == 0)
                {
                    throw new Exception("没有可用的转储区信息");
                }
                this.cmbtoslname.DataSource    = zcql;
                this.cmbtoslname.ValueMember   = "slId";
                this.cmbtoslname.DisplayMember = "slName";

                x   = HttpHelper.HttpPost("getBalanceTransferOrderNumber", "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                Model.Mccode mc = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
                this.labccode.Text = mc.data;
                Cursor.Current     = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);

                return;
            }
            init();
            this.txtbarcode.Text     = "";
            this.txttoslname.Enabled = true;
            this.cmbtoslname.Enabled = true;
            this.txttoslname.Focus();
        }
Esempio n. 3
0
        void getNewOrder(string shippercode)
        {
            string x = HttpHelper.HttpPost("createNoOrderTransfer", @"shipperCode=" + shippercode + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            Model.Mccode m = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
            if (m == null)
            {
                throw new Exception("数据信息捕捉失败");
            }
            if (m.data == "")
            {
                throw new Exception("没有该对应的单据");
            }

            ccode = m.data;
        }
Esempio n. 4
0
        private void frmDirTranMove_Load(object sender, EventArgs e)
        {
            //Ot.frmTMcustomer frm = new Rf_Wms.Ot.frmTMcustomer();
            //frm.ShowDialog();
            //if (frm.ccode == "")
            //{
            //    this.Close();
            //}
            //else
            //{
            //    this.laborderid.Text = frm.ccode;
            //}
            this.cmbmaterialSurface.DataSource    = Comm.basein.data.transferMaterialSurfaces;
            this.cmbmaterialSurface.ValueMember   = "code";
            this.cmbmaterialSurface.DisplayMember = "description";
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("createNoOrderTransfer", @"lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&updater=" + Comm.usercode);
                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                Model.Mccode m = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
                if (m == null)
                {
                    throw new Exception("数据信息捕捉失败");
                }
                if (m.data == "")
                {
                    throw new Exception("生单有问题,请退出再进");
                }
                this.laborderid.Text = m.data;
                Cursor.Current       = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                return;
            }
            this.txttraycode.Enabled = true;
            this.txttraycode.Focus();


            //this.txtSlname.Focus();
        }
Esempio n. 5
0
        void Save()
        {
            string conn = @"pickNo=" + mss.data.pickNo + "&lcCode=" + Comm.lcCode + "&checkQuantity=" + commonqty.ToString() + "&checkMinQuantity=" + minqty.ToString() + "&updater=" + Comm.usercode + "&trayCode=" + mss.data.trayCode + "&sortingType=" + mss.data.sortingType + "&pickType=" + mss.data.pickType + "&checkType=" + mss.data.checkType + "&materialCode=" + pickdetails.materialCode;


            string x = HttpHelper.HttpPost("doSecondarySorting", conn);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            Model.Mccode c = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
            if (!string.IsNullOrEmpty(c.data))
            {
                MessageBox.Show(c.data);
            }
        }
Esempio n. 6
0
        void Save()
        {
            string conn = @"pickNo=" + mss.data.pickNo + "&lcCode=" + Comm.lcCode + "&checkQuantity=" + commonqty.ToString() + "&checkMinQuantity=" + minqty.ToString() + "&updater=" + Comm.usercode + "&trayCode=" + mss.data.trayCode + "&sortingType=" + mss.data.sortingType + "&pickType=" + mss.data.pickType + "&checkType=" + mss.data.checkType;

            conn += "&pickOperateId=" + mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pickOperateId + "&fromTrayCode=" + mss.data.pickOperateSecondarySortingRFDTOS[mssrow].fromTrayCode + "&toTrayCode=" + mss.data.pickOperateSecondarySortingRFDTOS[mssrow].toTrayCode;
            if (mss.data.sortingType == 1)
            {
                conn += "&stockOutNo=" + msec.data[secrow].stockOutNo + "&stockOutItemId=" + msec.data[secrow].stockOutItemId;
            }
            if (mss.data.sortingType == 2)
            {
                conn += "&plateNo=" + msec.data[secrow].plateNo + "&trainFrequency=" + msec.data[secrow].trainFrequency + "&platePlan=" + msec.data[secrow].platePlan;
            }
            if (mss.data.sortingType == 3)
            {
                conn += "&sendToCode=" + msec.data[secrow].sendToCode + "&sendToName=" + msec.data[secrow].sendToName;
            }
            if (mss.data.sortingType == null)
            {
                conn += "&pdateString=" + mss.data.pickOperateSecondarySortingRFDTOS[mssrow].pDate + "&batchNo=" + mss.data.pickOperateSecondarySortingRFDTOS[mssrow].batchNo;
            }
            string x = HttpHelper.HttpPost("doSecondarySorting", conn);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            Model.Mccode c = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
            if (!string.IsNullOrEmpty(c.data))
            {
                MessageBox.Show(c.data);
            }
        }
Esempio n. 7
0
        private void txttotraycode_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == 27)
            {
                this.txtshelve.Text = "";
                //this.txtshelve.Enabled = false;
                this.txttotraycode.Text    = "";
                this.txttotraycode.Enabled = false;
                this.txtcarton.Enabled     = true;
                this.txtcarton.Text        = "";
                this.labmaterialname.Text  = "";
                this.labrecommendSlId.Text = "";
                this.labcode.Text          = "";
                this.labqty.Text           = "";
                this.txtcarton.Focus();
            }
            if (e.KeyChar != 13)
            {
                return;
            }
            if (string.IsNullOrEmpty(this.txttotraycode.Text.Trim()))
            {
                this.txttotraycode.Enabled = false;
                this.txtshelve.Enabled     = true;
                this.txtshelve.Focus();
                return;
            }
            if (this.txttotraycode.Text.Trim() == this.txtcarton.Text.Trim())
            {
                this.txttotraycode.Enabled = false;
                this.txtshelve.Enabled     = true;
                this.txtshelve.Focus();
                return;
            }
            Model.MTrayByBox mm = null;
            if (this.txttotraycode.Text.Length < Comm.lcCode.Length)
            {
                MessageBox.Show("请扫描条码");
                this.txttotraycode.SelectAll();
                return;
            }
            if (Comm.lcCode != this.txttotraycode.Text.Substring(0, Comm.lcCode.Length))
            {
                try
                {
                    Cursor.Current = Cursors.WaitCursor;
                    string x = HttpHelper.HttpPost("getTrayByBox", @"boxCode=" + this.txttotraycode.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);
                    }
                    mm = (Model.MTrayByBox)JsonConvert.DeserializeObject(x, typeof(Model.MTrayByBox));
                    if (mm == null)
                    {
                        throw new Exception("错误信息捕捉失败");
                    }
                    this.txtcarton.Text = mm.data.trayCode;
                    Cursor.Current      = Cursors.Default;
                }
                catch (Exception ex)
                {
                    Cursor.Current = Cursors.Default;
                    this.txtcarton.SelectAll();
                    MessageBox.Show(ex.Message);
                    return;
                }
            }
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                string x = HttpHelper.HttpPost("toTrayCodeRefundVerify", @"toTrayCode=" + this.txttotraycode.Text.Trim() + "&lcCode=" + Comm.lcCode + "&fromTrayCode=" + this.txtcarton.Text.Trim());

                msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
                if (msg == null)
                {
                    throw new Exception("错误信息捕捉失败");
                }
                if (!msg.success)
                {
                    throw new Exception(msg.msg);
                }
                Cursor.Current = Cursors.Default;
                Model.Mccode mcc = (Model.Mccode)JsonConvert.DeserializeObject(x, typeof(Model.Mccode));
                if (!string.IsNullOrEmpty(mcc.data))
                {
                    DialogResult dr = MessageBox.Show(mcc.data, "", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
                    if (dr != DialogResult.Yes)
                    {
                        this.txtshelve.SelectAll();
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                this.txtshelve.SelectAll();
                return;
            }
            try
            {
                Cursor.Current = Cursors.WaitCursor;
                Save();
                Cursor.Current = Cursors.Default;
            }
            catch (Exception ex)
            {
                Cursor.Current = Cursors.Default;
                MessageBox.Show(ex.Message);
                this.txtshelve.SelectAll();
                return;
            }
            Init();
        }