示例#1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            try
            {
                if (SysConvert.ToDecimal(txtQty.Text.Trim()) <= 0)
                {
                    this.ShowMessage("清输入数量");
                    return;
                }

                PackBox entity = new PackBox();
                entity.ID = m_ID;
                entity.SelectByID();

                if (entity.Qty < SysConvert.ToDecimal(txtQty.Text.Trim()))
                {
                    this.ShowMessage("需开匹的数量要小于原有数量");
                    return;
                }

                PackBoxKPRule rule = new PackBoxKPRule();
                rule.RAdd(m_ID, SysConvert.ToDecimal(txtQty.Text.Trim()), FParamConfig.LoginID);
                m_KPFinishFlag = true;
                this.ShowInfoMessage("开匹完成");
                this.Close();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
示例#2
0
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            PackBoxKPRule rule   = new PackBoxKPRule();
            PackBoxKP     entity = EntityGet();

            entity.SubmitFlag = this.HTSubmitFlagInsertGet();
            rule.RAdd(entity);
            return(entity.ID);
        }