Exemplo n.º 1
0
        /// <summary>
        /// 删除采购单列表、采购单明细列表记录
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnDel_Click(object sender, EventArgs e)
        {
            if (this.gridView3.RowCount == 0)
            {
                XtraMessageBox.Show("无可操作记录!", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            if (string.IsNullOrEmpty(purchaseId))
            {
                XtraMessageBox.Show("请选择一条采购单记录!");
            }
            else
            {
                if (XtraMessageBox.Show("是否确认删除操作?", "提示信息", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    //删除离线采购单
                    bool flag = new PurchaseOfflineBLL().PurchaseDeleteLocal(purchaseId, base.CurrentUserOrgId);

                    if (flag == true)
                    {
                        XtraMessageBox.Show("采购单删除成功!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    else
                    {
                        XtraMessageBox.Show("采购单删除失败!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }
                    this.FormPurchaseBuild_Load(sender, e);
                }
            }
        }
Exemplo n.º 2
0
        private void btnSend_Click(object sender, EventArgs e)
        {
            bool flag;

            flag = new PurchaseOfflineBLL().putCheckPurchaseOffline(purchaseId);
            if (flag)
            {
                XtraMessageBox.Show("送审成功!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                purchasedt = PurchaseClientDao.GetInstance().getPurchaseCreate(base.CurrentUserOrgId);

                //将原来的按照ID排序,修改为按照时间排序
                purchasedt.DefaultView.Sort = " create_date1 desc";

                setFilter();
            }
            else
            {
                XtraMessageBox.Show("送审失败!没有返回数据!", Constant.MsgTitle, MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
        }