Esempio n. 1
0
 private void pictureBox9_Click(object sender, EventArgs e)
 {
     CK.frmCheckVoSecond frm = new frmCheckVoSecond();
     frm.ShowDialog();
 }
Esempio n. 2
0
        void checkAgain()
        {
            string con = @"orderId=" + this.txtorderid.Text + "&lcCode=" + Comm.lcCode + "&whId=" + Comm.warehousecode + "&orderItemId=" + mc.data.orderItemId + "&updater=" + Comm.usercode;

            con += "&exception=1";
            try
            {
                if (string.IsNullOrEmpty(this.txtcommonqty.Text))
                {
                    commonqty = -1;
                }
                else
                {
                    commonqty = Convert.ToInt32(this.txtcommonqty.Text);
                }
                if (string.IsNullOrEmpty(this.txtminqty.Text))
                {
                    minqty = -1;
                }
                else
                {
                    minqty = Convert.ToInt32(this.txtminqty.Text);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            if (commonqty != -1 || minqty != -1)
            {
                con += "&quantity=" + commonqty + "&minQuantity=" + minqty;
            }
            con += "&rrId=" + this.cbxrr.SelectedValue.ToString();
            //if (k.Count != 0)
            //{
            //    con += "&repeatReason=[";
            //    foreach (Model.MCVreason y in k)
            //    {
            //        con += "{\"trayCode\":\"" + y.code + "\",";
            //        con += "\"repeatReason\":" + y.des + "},";
            //    }
            //    con = con.Substring(0, con.Length - 1) + "]";
            //}
            string x = HttpHelper.HttpPost("checkRepeats", con);

            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }

            m = (Model.MrepeatInfos)JsonConvert.DeserializeObject(x, typeof(Model.MrepeatInfos));
            if (m == null)
            {
                throw new Exception("Mcheckrepeats捕捉失败");
            }
            Cursor.Current = Cursors.Default;
            frmCheckVoSecond frm = new frmCheckVoSecond();

            frm.m       = m;
            frm.orderid = this.txtorderid.Text;
            frm.ShowDialog();

            x   = HttpHelper.HttpPost("checkResult", @"lcCode=" + Comm.lcCode + "&orderId=" + this.txtorderid.Text + "&whId=" + Comm.warehousecode + "&rrId=" + this.cbxrr.SelectedValue.ToString());
            msg = (Model.Mmsg)JsonConvert.DeserializeObject(x, typeof(Model.Mmsg));
            if (msg == null)
            {
                throw new Exception("错误信息捕捉失败");
            }
            if (!msg.success)
            {
                throw new Exception(msg.msg);
            }
            mc = (Model.McheckResult)JsonConvert.DeserializeObject(x, typeof(Model.McheckResult));
            if (mc == null)
            {
                throw new Exception("checkResult捕捉失败");
            }
            Clear();
            //k.Clear();

            if (mc.data == null)
            {
                this.txtorderid.Enabled = true;
                this.txtorderid.Focus();
                this.txtorderid.SelectAll();
                throw new Exception("该库区盘点完成");
            }
            this.labsIname.Text       = mc.data.slName;
            this.labmaterialcode.Text = "物料信息 " + mc.data.materialCode + " " + mc.data.materialName;
            //this.labmaterialname.Text = mc.data.materialName;
            this.labcommonUnit.Text = mc.data.commonUnitName;
            this.labminunit.Text    = mc.data.minUnitName;
            this.labinfo.Text       = mc.data.pdate + " " + mc.data.batchNo;
            if (!mc.data.blind)
            {
                this.labinfo.Text         += " " + mc.data.quantity.ToString() + mc.data.commonUnitName + mc.data.minQuantity.ToString() + mc.data.minUnitName;
                this.btnCheckAgain.Visible = true;
            }
            else
            {
                this.btnCheckAgain.Visible = false;
            }
            this.txtorderid.Enabled = false;
            this.txtSlId.Enabled    = true;
            this.txtSlId.Focus();
        }