示例#1
0
        /// <summary>
        /// 提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnSubmit_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.提交1))
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }

                if (HTDataID == 0)
                {
                    this.ShowMessage("请选择要操作的记录");
                    return;
                }

                PackBoxKPRule rule = new PackBoxKPRule();
                rule.RSubmit(HTDataID, 1);

                FCommon.AddDBLog(this.Text, FormStatus.提交.ToString(), "ID:" + HTDataID, "");
                this.SetPosStatus(HTDataID);
                BindGrid();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }
示例#2
0
        /// <summary>
        /// 删除
        /// </summary>
        public override void EntityDelete()
        {
            PackBoxKPRule rule   = new PackBoxKPRule();
            PackBoxKP     entity = EntityGet();

            rule.RDelete(entity);
        }
示例#3
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);
            }
        }
示例#4
0
        /// <summary>
        /// 绑定Grid
        /// </summary>
        public override void BindGrid()
        {
            PackBoxKPRule rule = new PackBoxKPRule();

            gridView1.GridControl.DataSource = rule.RShow(HTDataConditionStr, ProcessGrid.GetQueryField(gridView1));
            gridView1.GridControl.Show();
        }
示例#5
0
        /// <summary>
        /// 修改
        /// </summary>
        public override void EntityUpdate()
        {
            PackBoxKPRule rule   = new PackBoxKPRule();
            PackBoxKP     entity = EntityGet();

            entity.SubmitFlag = this.HTSubmitFlagInsertGet();
            rule.RUpdate(entity);
        }
示例#6
0
        /// <summary>
        /// 新增
        /// </summary>
        public override int EntityAdd()
        {
            PackBoxKPRule rule   = new PackBoxKPRule();
            PackBoxKP     entity = EntityGet();

            entity.SubmitFlag = this.HTSubmitFlagInsertGet();
            rule.RAdd(entity);
            return(entity.ID);
        }
示例#7
0
        /// <summary>
        /// 撤销提交
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        public override void btnSubmitCancel_Click(object sender, EventArgs e)
        {
            try
            {
                if (!FCommon.RightCheck(this.FormID, this.RightFormID, this.FormListAID, this.FormListBID, RightSub.提交1))
                {
                    this.ShowMessage("你没有此操作权限");
                    return;
                }
                if (HTDataID == 0)
                {
                    this.ShowMessage("请选择要操作的记录");
                    return;
                }
                //sc 撤销提交前判断细码是否已经出库
                for (int i = 0; i < gridView1.RowCount; i++)
                {
                    string    sql = "SELECT BoxStatusID FROM WH_PackBox WHERE BoxNo = " + SysString.ToDBString(SysConvert.ToString((gridView1.GetRowCellValue(i, "BoxNo"))));
                    DataTable dt  = SysUtils.Fill(sql);
                    if (dt.Rows.Count != 0)
                    {
                        if (SysConvert.ToInt32(dt.Rows[0]["BoxStatusID"]) == (int)EnumBoxStatus.出库)
                        {
                            this.ShowMessage("此细码:" + SysConvert.ToString((gridView1.GetRowCellValue(i, "BoxNo"))) + "  已出库,不可撤销提交!");
                            return;
                        }
                    }
                }

                PackBoxKPRule rule = new PackBoxKPRule();
                rule.RSubmit(HTDataID, 0);

                FCommon.AddDBLog(this.Text, FormStatus.撤消提交.ToString(), "ID:" + HTDataID, "");
                this.SetPosStatus(HTDataID);
                BindGrid();
            }
            catch (Exception E)
            {
                this.ShowMessage(E.Message);
            }
        }