Ejemplo n.º 1
0
        //保存
        protected void BtnSave_Click(object sender, EventArgs e)
        {
            string ordernums = hidOrdernums.Text.ToString();

            if (ordernums.Length == 0)
            {
                return;
            }
            string reason = txtReason.Text.ToString().Trim();

            if (string.IsNullOrEmpty(reason))
            {
                MessageBoxShow("请填写作废原因!"); return;
            }
            if (!mamagement.UpdateOrdersCancellation(Userinfo.userName, ordernums, reason))
            {
                MessageBoxShow("作废订单失败,请刷新页面重新操作!");
                return;
            }
            string str = mamagement.SelectOrderbarcodeByBill(ordernums);

            if (str != null && str != "")
            {
                MessageBoxShow(string.Format("作废成功,订单[{0}]已经出过账单,请及时处理!", str));
            }
            else
            {
                //MessageBoxShow("订单作废成功!");
            }
            JournalLog(ordernums, "作废订单");
            CloseWinAndRefresh();
        }
Ejemplo n.º 2
0
        //作废
        protected void btnCancel_Click(object sender, EventArgs e)
        {
            string ordernums = GetSelectOrderNums(true);
            bool   falg      = true;

            if (ordernums == string.Empty)
            {
                return;
            }
            string str = mamagement.SelectOrderbarcodeByCollected(ordernums);

            if (str != null && str != "")
            {
                MessageBoxShow(string.Format("订单[{0}]已经采过血不能作废!请先去掉勾选重试!", str)); return;
            }
            if (mamagement.UpdateOrdersCancellation(Userinfo.userName, ordernums, ""))
            {
                //刷记录
                falg = true;
                BindData((ViewState["SearchWhere"] as Hashtable), false);
            }
            else
            {
                falg = false;
                MessageBoxShow("作废订单失败,请刷新页面重试!"); return;
            }

            str = mamagement.SelectOrderbarcodeByBill(ordernums);
            if (str != null && str != "")
            {
                if (falg)
                {
                    MessageBoxShow(string.Format("作废成功,订单[{0}]已经出过账单,请及时处理!", str));
                }
            }
            else
            {
                if (falg)
                {
                    MessageBoxShow("订单作废成功!");
                }
            }


            //记录日志
            JournalLog(ordernums, "作废订单");
        }