/// <summary> /// 返回退订机票实体 /// </summary> /// <param name="TicketId"></param> /// <returns></returns> public EyouSoft.Model.TourStructure.CustomerRefund GetRefundTicketModel(int TicketId) { string refundId = dal.GetRefundTicketModel(TicketId); if (!string.IsNullOrEmpty(refundId)) { EyouSoft.BLL.TourStructure.TourOrder bll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.CustomerRefund model = new EyouSoft.Model.TourStructure.CustomerRefund(); model = bll.GetCustomerRefund(refundId); return(model); } else { return(null); } }
//数据初始化 private void onInit() { //退票状态绑定 TuiPiaoStateBind(); //数据证件类型绑定 CusCardTypeBind(); int id = Utils.GetInt(Utils.GetQueryStringValue("id")); //根据id得到详细数据 EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.TourStructure.CustomerRefund model = bll.GetRefundTicketModel(id); #region 数据初始化 if (model != null) { //线路名称 this.lblLineName.Text = model.RouteName; //团号 this.lblTuanHao.Text = model.TourNo; //人数 this.lblPersonCount.Text = "1"; //退票须知 this.txtTuiPiaoMust.Text = model.RefundNote; //退回金额 this.txtTuiMoney.Text = Utils.FilterEndOfTheZeroString(model.RefundAmount.ToString()); if (model.IsRefund == EyouSoft.Model.EnumType.PlanStructure.TicketRefundSate.已退票) { this.ddlJiPiaoState.SelectedValue = "4"; this.ddlJiPiaoState.Enabled = false; } else { this.ddlJiPiaoState.SelectedValue = "1"; } #region 航段与退票名单绑定 //获得该游客退票信息 this.rptList.DataSource = new EyouSoft.BLL.PlanStruture.PlaneTicket().GetRefundTicketFlights(model.Id); this.rptList.DataBind(); this.txtCusName.Value = model.VisitorName; this.txtCardNumber.Value = model.CradNumber; CardType = model.CradType.ToString(); #endregion } #endregion }
//游客信息初始化 private void OnInit() { //游客ID string cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID"); //退票编号 string RefundId = EyouSoft.Common.Utils.GetQueryStringValue("RefundId"); if (!string.IsNullOrEmpty(cusID)) { BindPlanInfo(cusID); EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.CustomerRefund TuiPiaoModel = TourOrderBll.GetCustomerRefund(RefundId); this.lblOPer.Text = SiteUserInfo.ContactInfo.ContactName; if (TuiPiaoModel != null) { this.txtTuiPiaoMust.Text = TuiPiaoModel.RefundNote; } } }
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 //取得页面上选择的航段集合 string[] strs = this.planIds.Value.Split('|'); //游客ID string cusID = EyouSoft.Common.Utils.GetQueryStringValue("cusID"); //退票编号 string RefundId = EyouSoft.Common.Utils.GetQueryStringValue("RefundId"); if (!string.IsNullOrEmpty(cusID)) { //退票后重新出票 bool isChuPiao = false;//this.chkBox.Checked; //退票须知 string must = this.txtTuiPiaoMust.Text; EyouSoft.Model.TourStructure.CustomerRefund TuiPiaoModel = new EyouSoft.Model.TourStructure.CustomerRefund(); EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); //添加退票记录 if (!string.IsNullOrEmpty(cusID)) { EyouSoft.Model.TourStructure.CustomerRefund model = TourOrderBll.GetCustomerRefund(RefundId); //编号 TuiPiaoModel.Id = System.Guid.NewGuid().ToString(); //操作员ID TuiPiaoModel.OperatorID = SiteUserInfo.ID; //操作员名字 if (SiteUserInfo.ContactInfo != null) { TuiPiaoModel.OperatorName = SiteUserInfo.ContactInfo.ContactName; } //游客编号 TuiPiaoModel.CustormerId = cusID; //退票时间 TuiPiaoModel.IssueTime = DateTime.Now; //退票需知 TuiPiaoModel.RefundNote = must; //退票状态 TuiPiaoModel.IsRefund = EyouSoft.Model.EnumType.PlanStructure.TicketRefundSate.已退票; //已退航段集合_遍历IDS取出 IList <EyouSoft.Model.TourStructure.MCustomerRefundFlight> list = new List <EyouSoft.Model.TourStructure.MCustomerRefundFlight>(); for (int i = 0; i < strs.Length - 1; i++) { EyouSoft.Model.TourStructure.MCustomerRefundFlight fight = new EyouSoft.Model.TourStructure.MCustomerRefundFlight(); fight.FlightId = Utils.GetInt(strs[i]); list.Add(fight); } //游客已退航段信息 TuiPiaoModel.CustomerRefundFlights = list; string tourID = ""; if (TourOrderBll.AddCustomerRefund(TuiPiaoModel, ref tourID)) { if (isChuPiao) { //跳转到申请机票页面 EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, string.Format(";alert('退票成功,系统将转入机票审请页面');window.parent.location='/sanping/SanPing_JiPiaoAdd.aspx?tourid={1}&cusId={2}';window.parent.Boxy.getIframeDialog('{0}').hide();", EyouSoft.Common.Utils.GetQueryStringValue("iframeId"), tourID, cusID)); } printSuccMsg("退票保存成功,待审核!"); } else { printFaiMsg("退票保存失败!"); } } TuiPiaoModel = null; TourOrderBll = null; } }