Пример #1
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, "作废订单");
        }
        //作废
        protected void btnCancel_Click(object sender, EventArgs e)
        {
            string ordernums = GetSelectOrderNums(true);

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

            if (str != null && str != "")
            {
                MessageBoxShow(string.Format("订单[{0}]已经采过血不能作废!请先去掉勾选重试!", str)); return;
            }
            WinCancel.IFrameUrl = "ProOrdersCancel.aspx?ordernums=" + ordernums;
            WinCancel.Hidden    = false;
        }