コード例 #1
0
        private void DoEditOne()
        {
            if (ucPoBody1.FocusedRowCount == 0)
            {
                MsgBox.Warn("请选中要编辑的行。");
                return;
            }

            if (ucPoBody1.FocusedRowCount > 1)
            {
                MsgBox.Warn("不支持多行操作,请选择其中一行。");
                return;
            }

            POBodyEntity focusedHeader = ucPoBody1.FocusedHeader;

            if (focusedHeader.BillState != BillStateConst.PO_STATE_CODE_DRAFT)
            {
                MsgBox.Warn(string.Format("单据“{0}”的状态不是草稿,不允许编辑。", focusedHeader.BillID));
                return;
            }

            FrmPoEdit frmEditBill = new FrmPoEdit(focusedHeader.BillID, false);

            frmEditBill.MdiParent = this.MdiParent;
            frmEditBill.Show();
        }
コード例 #2
0
        void DoClickEvent(string tag)
        {
            switch (tag)
            {
            case "刷新":
                ReloadPO();
                break;

            case "进行中单据":
                ucPoQueryConditionPanel1.DoQueryNotCompleteBill("所有进行中(未完成收货)的单据");
                break;

            case "近一周单据":
                ucPoQueryConditionPanel1.DoQuery(DateTime.Now.AddDays(-6).Date, DateTime.Now.AddDays(1).Date,
                                                 string.Format("最近一周(【{0}】-【{1}】)创建的单据",
                                                               DateTime.Now.AddDays(-6).Date.ToShortDateString(),
                                                               DateTime.Now.Date.ToShortDateString()));
                break;

            case "新建":
                using (FrmPoEdit frmNewBill = new FrmPoEdit())
                {
                    frmNewBill.MdiParent = this.MdiParent;
                    frmNewBill.Show();
                }
                break;

            case "编辑":
                DoEditOne();
                break;

            case "删除":
                prePOManager.DeleteSelectedBill(ucPoBody1.FocusedHeaders);
                break;

            case "取消提交":
                prePOManager.CancelCommitBill(ucPoBody1.FocusedHeaders);
                break;

            case "提交":
                prePOManager.CommitBill(ucPoBody1.FocusedHeaders);
                break;

            case "新采购订单":
                DoCopyOne();
                break;

            case "单据日志":
                prePOManager.ViewLog(ucPoBody1.FocusedHeader);
                break;

            default:
                MsgBox.OK("正在实现");
                break;
            }
        }
コード例 #3
0
        private void DoCopyOne()
        {
            if (ucPoBody1.FocusedRowCount == 0)
            {
                MsgBox.Warn("请选中要复制的行。");
                return;
            }

            if (ucPoBody1.FocusedRowCount > 1)
            {
                MsgBox.Warn("不支持多行操作,请选择其中一行。");
                return;
            }

            FrmPoEdit frmEditBill = new FrmPoEdit(ucPoBody1.FocusedHeader.BillID, true);

            frmEditBill.MdiParent = this.MdiParent;
            frmEditBill.Show();
        }