Пример #1
0
        //游客信息初始化
        private void OnInit()
        {
            //游客ID
            string cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID").Trim();

            this.lblTuanHao.Text = EyouSoft.Common.Utils.GetQueryStringValue("tourNo");
            if (!string.IsNullOrEmpty(cusID))
            {
                EyouSoft.BLL.TourStructure.TourOrder        TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder();
                EyouSoft.Model.TourStructure.CustomerLeague TuiTuanModel = TourOrderBll.GetLeague(cusID);
                if (TuiTuanModel != null)
                {
                    this.txtMoney.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroDecimal((TuiTuanModel.RefundAmount));
                    this.txtReson.Text = TuiTuanModel.RefundReason;
                    TourOrderBll       = null;
                    TuiTuanModel       = null;
                }
            }
        }
Пример #2
0
        //游客退团保存
        protected void lkBtnSave_Click(object sender, EventArgs e)
        {
            #region 判断是否提交财务
            EyouSoft.Model.TourStructure.TourBaseInfo m = new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(Utils.GetQueryStringValue("tourid"));
            if (m != null)
            {
                if (!Utils.PlanIsUpdateOrDelete(m.Status.ToString()))
                {
                    Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>");
                    return;
                }
            }
            #endregion
            //游客ID
            string  cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID");
            decimal money = EyouSoft.Common.Utils.GetDecimal(this.txtMoney.Text);
            //原因
            string reson = this.txtReson.Text;
            EyouSoft.Model.TourStructure.CustomerLeague CustomerModel = new EyouSoft.Model.TourStructure.CustomerLeague();

            EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder();
            if (!string.IsNullOrEmpty(cusID))
            {
                EyouSoft.Model.TourStructure.CustomerLeague model = TourOrderBll.GetLeague(cusID);
                if (model != null && model.CustormerId == cusID)
                {
                    CustomerModel.CustormerId  = cusID;
                    CustomerModel.OperatorID   = SiteUserInfo.ID;
                    CustomerModel.OperatorName = SiteUserInfo.UserName;
                    CustomerModel.RefundAmount = money;
                    CustomerModel.RefundReason = reson;
                    if (TourOrderBll.UpdateLeague(CustomerModel))
                    {
                        printSuccMsg("退团修改成功!");
                    }
                    else
                    {
                        printFaiMsg("退团失败!");
                    }
                }
                else
                {
                    CustomerModel.CustormerId  = cusID;
                    CustomerModel.IssueTime    = DateTime.Now;
                    CustomerModel.OperatorID   = SiteUserInfo.ID;
                    CustomerModel.OperatorName = SiteUserInfo.UserName;
                    CustomerModel.RefundAmount = money;
                    CustomerModel.RefundReason = reson;
                    if (TourOrderBll.AddLeague(CustomerModel))
                    {
                        printSuccMsg("退团成功!");
                    }
                    else
                    {
                        printFaiMsg("退团失败!");
                    }
                }
            }
            CustomerModel = null;
            TourOrderBll  = null;
        }