protected void PageInit() { IList <EnumObj> list = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.RefundType)); if (list != null && list.Count > 0) { this.ddl_PayType.DataSource = list; this.ddl_PayType.DataTextField = "Text"; this.ddl_PayType.DataValueField = "Value"; this.ddl_PayType.DataBind(); } orderId = Utils.GetQueryStringValue("id"); if (!string.IsNullOrEmpty(orderId)) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.TourOrder TourOrderModel = TourOrderBll.GetOrderModel(CurrentUserCompanyID, orderId); if (TourOrderModel != null) { pepoleNum = TourOrderModel.AdultNumber.ToString(); pepoleNum2 = TourOrderModel.ChildNumber.ToString(); hidRouteName.Value = TourOrderModel.RouteName; hidOrderId.Value = TourOrderModel.ID; } EyouSoft.BLL.PlanStruture.PlaneTicket BLL = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = BLL.GetTicketOutInfoByOrderId(orderId); hidIsExtsisTicket.Value = model != null ? "1" : "0"; if (model != null) { piaomianjia = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Price); shui = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OilFee); pepoleNum = model.TicketKindInfoList.FirstOrDefault().PeopleCount.ToString(); DaiLiFei = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().AgencyPrice); Percent = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Discount); OtherMoney = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OtherPrice); piaokuan = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().TotalMoney); if (model.TicketKindInfoList.Count > 1) { piaomianjia2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Price); shui2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OilFee); pepoleNum2 = model.TicketKindInfoList[1].PeopleCount.ToString(); DaiLiFei2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].AgencyPrice); Percent2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Discount); OtherMoney2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OtherPrice); piaokuan2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].TotalMoney); } Total = Utils.FilterEndOfTheZeroDecimal(model.Total); PNR = model.PNR; ddl_PayType.SelectedIndex = (int)model.PayType; Remark = model.Remark; Notice = model.Notice; this.hideId.Value = model.TicketOutId; if ((int)model.State >= 2) { lbtn_submit.Visible = false; } } } }
protected void lbtnquxiao_Click(object sender, EventArgs e) { string Ticketid = Utils.GetQueryStringValue("id"); EyouSoft.BLL.PlanStruture.PlaneTicket PlaneTicket = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (Ticketid != "" && !string.IsNullOrEmpty(Ticketid)) { int Result = PlaneTicket.QuXiaoShenHe(Ticketid); //1:成功,-1:非审核通过状态下的机票申请不存在取消审核操作,-2:团队已提交财务不可取消审核 switch (Result) { case 1: { Response.Write("<script>alert('已经取消审核!');window.parent.location.href='/caiwuguanli/JiPiaoAudit.aspx'</script>"); } break; case -1: { Response.Write("<script>alert('非审核通过状态下的机票申请不存在取消审核操作');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();</script>"); } break; case -2: { Response.Write("<script>alert('该计划已提交财务,不能取消审核!');parent.Boxy.getIframeDialog('" + Request.QueryString["iframeid"] + "').hide();</script>"); } break; } } }
protected override void OnPreRender(EventArgs e) { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(userInfo); NumConfig = (int)(new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(userInfo.CompanyID)); SetDataList(); base.OnPreRender(e); }
/// <summary> /// 取消出票按钮事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtnCancelTicket_Click(object sender, EventArgs e) { string planId = Utils.GetQueryStringValue("id"); EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (bll.CancelTicket(planId) == 1) { Utils.ShowMsgAndCloseBoxy("取消机票成功", Utils.GetQueryStringValue("iframeId"), true); } bll = null; }
//列表初始化 protected void ListBind(string[] operIds, string operName, string inputGoLine, string inputDate, string tourCode, DateTime?sVerifyTime, DateTime?eVerifyTime, DateTime?lSDate, DateTime?lEDate) { int pageCount = 1; EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(SiteUserInfo); System.Collections.Generic.IList <EyouSoft.Model.PlanStructure.TicketInfo> list = null; EyouSoft.Model.PlanStructure.TicketSearchModel SearchModel = new EyouSoft.Model.PlanStructure.TicketSearchModel(); if (!(string.IsNullOrEmpty(operName) && string.IsNullOrEmpty(inputDate) && string.IsNullOrEmpty(operName) && string.IsNullOrEmpty(inputGoLine) && string.IsNullOrEmpty(tourCode) && !sVerifyTime.HasValue && !eVerifyTime.HasValue && !lSDate.HasValue && !lEDate.HasValue)) { SearchModel.TicketListOrFinancialList = 1; SearchModel.CompanyId = SiteUserInfo.CompanyID; SearchModel.Operator = operName; SearchModel.DepartureTime = inputDate; SearchModel.FligthSegment = inputGoLine; SearchModel.TourCode = tourCode; SearchModel.SVerifyTime = sVerifyTime; SearchModel.EVerifyTime = eVerifyTime; SearchModel.LSDate = lSDate; SearchModel.LEDate = lEDate; //根据条件搜索相关记录 list = bll.SearchTicketOut(pageSize, pageIndex, SearchModel, ref recordCount, ref pageCount); } else { list = bll.GetCheckedTicketList(pageSize, pageIndex, SiteUserInfo.CompanyID, ref recordCount, ref pageCount); } if (list != null && list.Count > 0) { repList.DataSource = list; repList.DataBind(); } else { this.ExporPageInfoSelect1.Visible = false; this.repList.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='12' align='center'>暂时没有数据!</td></tr>"; } BindPage(); }
//数据初始化 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 }
protected void lbtnSave_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 int ticketID = Utils.GetInt(Utils.GetQueryStringValue("id")); //EyouSoft.Model.PlanStructure.TicketRefundModel refundModel = new EyouSoft.Model.PlanStructure.TicketRefundModel(); EyouSoft.Model.PlanStructure.MRefundTicketInfo mRefundTicketInfo = new EyouSoft.Model.PlanStructure.MRefundTicketInfo(); //退票须知 mRefundTicketInfo.Remark = this.txtTuiPiaoMust.Text; // refundModel.Remark = this.txtTuiPiaoMust.Text; //退票状态,如果没有回传,说明是已退票 if (String.IsNullOrEmpty(Utils.GetFormValue("ddlJiPiaoState"))) { mRefundTicketInfo.Status = EyouSoft.Model.EnumType.PlanStructure.TicketRefundSate.已退票; //refundModel.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.已退票; } else { mRefundTicketInfo.Status = (EyouSoft.Model.EnumType.PlanStructure.TicketRefundSate)Utils.GetInt(Utils.GetFormValue("ddlJiPiaoState")); } //退回金额 mRefundTicketInfo.RefundAmount = Utils.GetDecimal(this.txtTuiMoney.Text); //refundModel.ReturnMoney = Utils.GetDecimal(this.txtTuiMoney.Text); mRefundTicketInfo.TicketListId = ticketID; mRefundTicketInfo.OperatorId = SiteUserInfo.ID; //refundModel.TicketId = ticketID; EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (bll.RefundTicket(mRefundTicketInfo)) { printSuccMsg("退票成功!"); } else { printFaiMsg("退票失败!"); } }
/// <summary> /// 初始化方法 /// </summary> /// <param name="id"></param> /// <param name="departIds"></param> /// <param name="areaIds"></param> /// <param name="beginDate"></param> /// <param name="endDate"></param> /// <param name="leaDateStart"></param> /// <param name="leaDateEnd"></param> /// <param name="officeName"></param> protected void DataInit(int id, string departIds, string areaIds, DateTime?beginDate, DateTime?endDate, DateTime?leaDateStart , DateTime?leaDateEnd, string officeName) { //部门ID 的集合 int[] departIdList = JiPiao_TuiList.GetIntArrByStr(departIds); //航空公司 ID 集合 int[] areaIdList = JiPiao_TuiList.GetIntArrByStr(areaIds); //声明查询Model EyouSoft.Model.StatisticStructure.QueryTicketOutStatisti searchModel = new EyouSoft.Model.StatisticStructure.QueryTicketOutStatisti(); //查询Model 赋值 searchModel.CompanyId = SiteUserInfo.CompanyID; searchModel.DepartIds = departIdList; searchModel.AirLineIds = areaIdList; searchModel.StartTicketOutTime = beginDate; searchModel.EndTicketOutTime = endDate; searchModel.OfficeId = id; searchModel.LeaveDateStart = leaDateStart; searchModel.LeaveDateEnd = leaDateEnd; searchModel.OfficeName = officeName; //声明机票 bll 操作对象 EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(SiteUserInfo); //声明出票量集合对象 IList <EyouSoft.Model.PlanStructure.TicketOutStatisticInfo> list = bll.GetTicketOutStatisticList(pageSize, pageIndex, ref recordCount, searchModel); //判断list内数据条数大于0 if (list != null && list.Count > 0) { //绑定控件 this.rptList.DataSource = list; this.rptList.DataBind(); //设置分页 BindPage(); //隐藏提示 this.lblMsg.Visible = false; } else { //隐藏分页 this.ExportPageInfo1.Visible = false; //显示提示 this.lblMsg.Visible = true; } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { /*if (Utils.GetQueryStringValue("tourId") != "") * { * string tourId = Utils.GetQueryStringValue("tourId"); * EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); * IList<EyouSoft.Model.TourStructure.TourOrderCustomer> listCus = orderbll.GetTravellers(tourId); * EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); * * IList<string> CustomerList = bll.CustomerList(tourId); * var list = from v in listCus * from k in CustomerList * where v.ID == k * select v; * rpt_list.DataSource = list.ToList(); * rpt_list.DataBind(); * rpt_list.EmptyText = "<tr><td colspan='4' align='center'>没有任何记录</td></tr>"; * * } * }*/ //request query ticketIssueId:机票出票编号 string ticketIssueId = Utils.GetQueryStringValue("ticketIssueId"); rpt_list.EmptyText = "<tr><td colspan='4' align='center'>没有任何记录</td></tr>"; if (!string.IsNullOrEmpty(ticketIssueId)) { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); var info = bll.GetTicketOutListModel(ticketIssueId); if (info != null && info.CustomerInfoList != null && info.CustomerInfoList.Count > 0) { rpt_list.DataSource = info.CustomerInfoList; rpt_list.DataBind(); } } } }
/// <summary> /// 绑定列表 /// </summary> void BindList() { EyouSoft.BLL.PlanStruture.PlaneTicket plan = new EyouSoft.BLL.PlanStruture.PlaneTicket(); IList <EyouSoft.Model.PlanStructure.MLBTicketApplyInfo> list = plan.GetTicketApplys(CurrentUserCompanyID, Request.QueryString["tourId"]); if (list != null && list.Count > 0) { //成人票款 this.litFundAdult.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(f => f.FundAdult.TotalMoney).ToString("c2")); //儿童票款 this.LitFunChildren.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(f => f.FundChildren.TotalMoney).ToString("c2")); //其它费用 if (config_Agency.HasValue && config_Agency.Value == EyouSoft.Model.EnumType.CompanyStructure.AgencyFeeType.公式三) { this.LitAgencyAdult.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(n => n.FundAdult.OtherPrice).ToString("c2")); this.LitAgencyChild.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(n => n.FundChildren.OtherPrice).ToString("c2")); } else { this.LitAgencyAdult.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(n => n.FundAdult.AgencyPrice).ToString("c2")); this.LitAgencyChild.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(n => n.FundChildren.AgencyPrice).ToString("c2")); } //成人数 儿童数 this.LitAdultCount.Text = list.Sum(n => n.FundAdult.PeopleCount).ToString(); this.litChildRenCount.Text = list.Sum(n => n.FundChildren.PeopleCount).ToString(); //总费用 this.LitTotalCount.Text = EyouSoft.Common.Utils.FilterEndOfTheZeroString(list.Sum(n => n.TotalAmount).ToString("c2")); rpt_list.DataSource = list; rpt_list.DataBind(); } else { this.tr.Visible = false; } }
public void ProcessRequest(HttpContext context) { UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); if (!_IsLogin) { return; } string TicketID = EyouSoft.Common.Utils.GetQueryStringValue("RefundId"); EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (!string.IsNullOrEmpty(TicketID) && bll.CheckTicket(TicketID, Utils.GetFormValue("remark"))) { context.Response.ContentType = "text/plain"; context.Response.Write("审核通过!"); } else { context.Response.ContentType = "text/plain"; context.Response.Write("审核失败!"); } }
private void onInit() { //证件类型绑定 CusCardTypeBind(); //航空公司绑定 AirCompanyTypeBind(); string id = Utils.GetQueryStringValue("id"); if (id != "") { //机票申请编号 this.hidRefundId.Value = id; EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.MCheckTicketInfo CheckTicket = bll.GetMCheckTicket(id); if (CheckTicket != null) { #region 航班 if (CheckTicket.TicketFlightList != null && CheckTicket.TicketFlightList.Count > 0) { RepAirList.DataSource = CheckTicket.TicketFlightList; RepAirList.DataBind(); } #endregion #region 机票状态 EyouSoft.Model.EnumType.PlanStructure.TicketState ticketState = CheckTicket.TicketState; switch (ticketState) { case EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请: { this.PanClose.Visible = false; this.Panquxiao.Visible = false; this.PanShenhe.Visible = true; } break; case EyouSoft.Model.EnumType.PlanStructure.TicketState.审核通过: { this.PanShenhe.Visible = false; this.Panquxiao.Visible = true; this.PanClose.Visible = false; } break; case EyouSoft.Model.EnumType.PlanStructure.TicketState.已出票: { this.PanClose.Visible = true; this.Panquxiao.Visible = false; this.PanShenhe.Visible = false; } break; default: break; } #endregion #region 单 if (CheckTicket.CustomerList != null && CheckTicket.CustomerList.Count > 0) { this.RepCusList.DataSource = CheckTicket.CustomerList; this.RepCusList.DataBind(); } #endregion #region 票款 if (CheckTicket.TicketKindList != null && CheckTicket.TicketKindList.Count > 0) { foreach (EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfo in CheckTicket.TicketKindList) { #region 成人 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.成人) { //票面价 this.txtAdultPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price); //税/机建 this.txtAdultShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee); //人数 this.txtAdultCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtAdultProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice); //票款 this.txtAdultSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney); //百分比 txt_Percent.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount); txt_DaiLiFei.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice); } #endregion #region 儿童 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.儿童) { //票面价 this.txtChildPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price); //税/机建 this.txtChildShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee); //人数 this.txtChildCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtChildProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice); //票款 this.txtChildSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney); txt_Percent2.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount); txt_DaiLiFei2.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice); } #endregion } } #endregion #region 订单信息 EyouSoft.Model.PlanStructure.TicketOutListInfo TicketOutListInfo = new EyouSoft.BLL.PlanStruture.PlaneTicket().GetTicketModel(id); if (TicketOutListInfo != null) { IList <EyouSoft.Model.TourStructure.OrderByCheckTicket> list = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderByCheckTicketByOrderId(SiteUserInfo.CompanyID, TicketOutListInfo.OrderId); if (list != null && list.Count > 0) { this.TicketOrderlist.DataSource = list; this.TicketOrderlist.DataBind(); } } #endregion //总费用 this.txtSumMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(CheckTicket.TotalAmount.ToString()).ToString("0.00")); //财务审核备注 txt_remark.Text = CheckTicket.ReviewRemark; } CheckTicket = null; bll = null; } }
//列表初始化 protected void ListBind(string[] operID, string operName, string inputDate, string inputGoLine, string timeStart, string timeEnd, EyouSoft.Model.EnumType.PlanStructure.TicketState state, string tourCode, DateTime?lSDate, DateTime?lEDate) { int pageCount = 1; pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); EyouSoft.BLL.PlanStruture.PlaneTicket PlaneTicketBll = new EyouSoft.BLL.PlanStruture.PlaneTicket(SiteUserInfo); EyouSoft.Model.PlanStructure.TicketSearchModel SearchModel = new EyouSoft.Model.PlanStructure.TicketSearchModel(); System.Collections.Generic.IList <EyouSoft.Model.PlanStructure.TicketInfo> Ilist = null; if (!(string.IsNullOrEmpty(operName) && string.IsNullOrEmpty(inputDate) && string.IsNullOrEmpty(inputGoLine) && string.IsNullOrEmpty(timeStart) && string.IsNullOrEmpty(timeEnd) && Convert.ToInt32(state) == 0 && string.IsNullOrEmpty(tourCode) && !lSDate.HasValue && !lEDate.HasValue)) { SearchModel.TicketListOrFinancialList = 2; SearchModel.CompanyId = SiteUserInfo.CompanyID; SearchModel.Operator = operName; SearchModel.DepartureTime = inputDate; SearchModel.FligthSegment = inputGoLine; SearchModel.TourCode = tourCode; if (timeStart != "") { SearchModel.AirTimeStart = Convert.ToDateTime(timeStart); } if (timeEnd != "") { SearchModel.AirTimeEnd = Convert.ToDateTime(timeEnd); } SearchModel.TicketState = state; SearchModel.LSDate = lSDate; SearchModel.LEDate = lEDate; //根据条件搜索相关记录 Ilist = PlaneTicketBll.SearchTicketOut(pageSize, pageIndex, SearchModel, ref recordCount, ref pageCount); } else { Ilist = PlaneTicketBll.GetTicketList(pageSize, pageIndex, SiteUserInfo.CompanyID, ref recordCount, ref pageCount); } if (Ilist != null && Ilist.Count > 0) { this.repList.DataSource = Ilist; this.repList.DataBind(); } else { this.ExporPageInfoSelect1.Visible = false; this.repList.EmptyText = "<tr><td height='30px' bgcolor='#e3f1fc' colspan='12' align='center'>暂时没有数据!</td></tr>"; } PlaneTicketBll = null; SearchModel = null; BindPage(); this.txtTimeStart.Value = timeStart; this.txtTimeEnd.Value = timeEnd; if (this.dpTicketState.Items.FindByValue(Convert.ToInt32(state).ToString()) != null) { this.dpTicketState.Items.FindByValue(Convert.ToInt32(state).ToString()).Selected = true; } }
protected void lbtnSave_Click1(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 msg = ""; string id = Utils.GetQueryStringValue("id"); if (checkData(ref msg)) { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = new EyouSoft.Model.PlanStructure.TicketOutListInfo(); #region 航班,名单,票款 #region 航班 //航班列表长度 int ariLength = Utils.GetFormValues("txtAirTime").Length; //客户列表长度 int cusLength = Utils.GetFormValues("txtCusName").Length; System.Collections.Generic.IList <EyouSoft.Model.PlanStructure.TicketFlight> TicketFlightList = new System.Collections.Generic.List <EyouSoft.Model.PlanStructure.TicketFlight>(); for (int i = 0; i < ariLength; i++) { EyouSoft.Model.PlanStructure.TicketFlight cusModel = new EyouSoft.Model.PlanStructure.TicketFlight(); //航班日期 string txtAirTime = Utils.GetFormValues("txtAirTime")[i]; //航班线路 string selAirLine = Utils.GetFormValues("selAirLine")[i]; //航空公司 string selAirCompany = Utils.GetFormValues("SelAirCompany")[i]; //折扣 string txtZheKo = Utils.GetFormValues("txtZheKo")[i]; //航班日期 cusModel.DepartureTime = Utils.GetDateTime(txtAirTime); //航班线路 cusModel.FligthSegment = selAirLine; //航空公司 cusModel.AireLine = (EyouSoft.Model.EnumType.PlanStructure.FlightCompany)(Utils.GetInt(selAirCompany)); //折扣 cusModel.Discount = Utils.GetDecimal(txtZheKo); cusModel.TicketTime = Utils.GetFormValues("txt_hbh_date")[i]; //添加到航班列表 TicketFlightList.Add(cusModel); cusModel = null; } //航班列表 model.TicketFlightList = TicketFlightList; #endregion #region 单 System.Collections.Generic.IList <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo> TicketOutCustomerInfoList = new System.Collections.Generic.List <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo>(); for (int i = 0; i < cusLength; i++) { EyouSoft.Model.PlanStructure.TicketOutCustomerInfo cusModel = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo(); //是否勾选 string cusID = ""; try { cusID = Utils.GetFormValues("chkOper")[i]; } catch { continue; } //客户姓名 string txtCusName = Utils.GetFormValues("txtCusName")[i]; //客户证件类型 string selCardType = Utils.GetFormValues("SelCardType")[i]; //证件号码 string txtCardNumber = Utils.GetFormValues("txtCardNumber")[i]; cusModel.TicketOutId = id; cusModel.UserId = cusID; //添加至客户列表 TicketOutCustomerInfoList.Add(cusModel); cusModel = null; } //客户列表对应关系 model.TicketOutCustomerInfoList = TicketOutCustomerInfoList; #endregion #region 票款 System.Collections.Generic.IList <EyouSoft.Model.PlanStructure.TicketKindInfo> TicketKindInfoList = new System.Collections.Generic.List <EyouSoft.Model.PlanStructure.TicketKindInfo>(); EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfoModel = new EyouSoft.Model.PlanStructure.TicketKindInfo(); //成人票面价 TicketKindInfoModel.Price = Utils.GetDecimal(this.txtAdultPrice.Value); //成人税/机建 TicketKindInfoModel.OilFee = Utils.GetDecimal(this.txtAdultShui.Value); //成人人数 TicketKindInfoModel.PeopleCount = Utils.GetInt(this.txtAdultCount.Value); //成人代理费 TicketKindInfoModel.AgencyPrice = Utils.GetDecimal(this.txtAdultProxyPrice.Value); //成人票款 TicketKindInfoModel.TotalMoney = Utils.GetDecimal(this.txtAdultSum.Value); //其它费用 TicketKindInfoModel.OtherPrice = Utils.GetDecimal(this.txt_OtherMoney.Value); //百分比 TicketKindInfoModel.Discount = Utils.GetDecimal(this.txt_Percent.Value, 100) / 100; //票款类型 TicketKindInfoModel.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.成人; TicketKindInfoModel.TicketId = id; TicketKindInfoList.Add(TicketKindInfoModel); EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfoModel1 = new EyouSoft.Model.PlanStructure.TicketKindInfo(); //儿童票面价 TicketKindInfoModel1.Price = Utils.GetDecimal(this.txtChildPrice.Value); //儿童税/机建 TicketKindInfoModel1.OilFee = Utils.GetDecimal(this.txtChildShui.Value); //儿童人数 TicketKindInfoModel1.PeopleCount = Utils.GetInt(this.txtChildCount.Value); //儿童代理费 TicketKindInfoModel1.AgencyPrice = Utils.GetDecimal(this.txtChildProxyPrice.Value); //儿童票款 TicketKindInfoModel1.TotalMoney = Utils.GetDecimal(this.txtChildSum.Value); //其它费用 TicketKindInfoModel1.OtherPrice = Utils.GetDecimal(this.txt_OtherMoneyChild.Value); //百分比 TicketKindInfoModel1.Discount = Utils.GetDecimal(this.txt_PercentChild.Value, 100) / 100; //票款类型 TicketKindInfoModel1.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.儿童; TicketKindInfoModel1.TicketId = id; TicketKindInfoList.Add(TicketKindInfoModel1); TicketKindInfoModel1 = null; TicketKindInfoModel = null; model.TicketKindInfoList = TicketKindInfoList; #endregion #endregion #region 基本信息 //总费用 model.Total = EyouSoft.Common.Utils.GetDecimal(this.txtSumMoney.Value); //支付方式 model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)EyouSoft.Common.Utils.GetInt(Utils.GetFormValue("ddlPayType")); // model.OperateID = SiteUserInfo.ID; model.CompanyID = SiteUserInfo.CompanyID; model.Operator = SiteUserInfo.ContactInfo.ContactName; model.RefundId = id; //出票表ID model.TicketOutId = id; //订单ID model.OrderId = this.hdOrderID.Value; //团号ID model.TourId = this.hdTourID.Value; //订票须知 model.Notice = this.txtOrderPiaoMust.Value; //PNR model.PNR = this.txtPNR.Value; //售票处 model.TicketOffice = this.txtSalePlace.Value; model.TicketOfficeId = Utils.GetInt(this.hd_PiaoWuSuppId.Value); //票号 model.TicketNum = this.txtPiaoHao.Value; //备注 model.Remark = this.txtMemo.Value; //线路名称 model.RouteName = this.hd_LineName.Value; #endregion if (this.IsOk.Checked) { model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.已出票; if (bll.ToTicketOut(model)) { TicketFlightList = null; TicketKindInfoList = null; TicketOutCustomerInfoList = null; printSuccMsg("保存成功!"); } else { TicketFlightList = null; TicketKindInfoList = null; TicketOutCustomerInfoList = null; printFaiMsg("保存失败"); } } else { model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.审核通过; if (bll.UpdateTicketOutListModel(model)) { TicketFlightList = null; TicketKindInfoList = null; TicketOutCustomerInfoList = null; printSuccMsg("修改成功!"); } else { TicketFlightList = null; TicketKindInfoList = null; TicketOutCustomerInfoList = null; printFaiMsg("修改失败!"); } } model = null; } else { onInit(); printFaiMsg(msg); } }
/// <summary> /// 该游客是否可以申请 /// </summary> /// <param name="id"></param> /// <returns></returns> public string isHave(string id, List <int> ApplyFlights, List <int> RefundFlights) { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); string strvalue = ""; #region 原来的判断 if (CustomerList == null) { CustomerList = bll.CustomerList(Utils.GetQueryStringValue("tourId")); } if (CustomerList != null) { if (CustomerList.Contains(id)) { string iD = Utils.GetString(Request.QueryString["id"], ""); if (id != "" && modelinfo == null) { modelinfo = bll.GetTicketOutListModel(iD); } if (modelinfo != null) { if (modelinfo.CustomerInfoList.Where(x => x.ID == id).Count() > 0) { strvalue = "checked='true'"; } else { ////////判断是否可选 //strvalue = "disabled=\"disabled\""; #region 配置判断 if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.None) { strvalue = ""; } else { int istuipiao = 0, enumtuipiao = 0;//1有退票,2全部退票,0没有退票 if (ApplyFlights != null) { if (RefundFlights != null) { foreach (var v in ApplyFlights) { var l = RefundFlights.Where(x => x == v); if (l.Count() > 0) { istuipiao++; } } } if (istuipiao > 0) { enumtuipiao = 1; } if (istuipiao == ApplyFlights.Count) { enumtuipiao = 2; } if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.LeastOne) { if (enumtuipiao == 0) { strvalue += " disabled=\"disabled\""; } } if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.All) { if (enumtuipiao != 2) { strvalue += " disabled=\"disabled\""; } } } } #endregion } } else { //strvalue = "disabled=\"disabled\""; #region 配置判断 if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.None) { strvalue = ""; } else { int istuipiao = 0, enumtuipiao = 0;//1有退票,2全部退票,0没有退票 if (ApplyFlights != null) { if (RefundFlights != null) { foreach (var v in ApplyFlights) { var l = RefundFlights.Where(x => x == v); if (l.Count() > 0) { istuipiao++; } } } if (istuipiao > 0) { enumtuipiao = 1; } if (istuipiao == ApplyFlights.Count) { enumtuipiao = 2; } if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.LeastOne) { if (enumtuipiao == 0) { strvalue += " disabled=\"disabled\""; } } if (TicketTraveller == EyouSoft.Model.EnumType.CompanyStructure.TicketTravellerCheckedType.All) { if (enumtuipiao != 2) { strvalue += " disabled=\"disabled\""; } } } } #endregion } } else { strvalue = ""; } } else { strvalue = ""; } #endregion if (id == Utils.GetQueryStringValue("cid")) { strvalue += " checked=\"true\""; } return(strvalue); }
private void onInit() { BindPayType(); //证件类型绑定 CusCardTypeBind(); //航空公司绑定 AirCompanyTypeBind(); string id = Utils.GetQueryStringValue("id"); if (id != "") { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(id); if (model != null) { #region 航班 if (model.TicketFlightList != null && model.TicketFlightList.Count > 0) { RepAirList.DataSource = model.TicketFlightList; RepAirList.DataBind(); } #endregion #region 单 this.hideTourId.Value = model.TourId; EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo); System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrderCustomer> cusromerList = orderbll.GetTravellers(model.TourId); if (cusromerList != null && cusromerList.Count > 0) { this.RepCusList.DataSource = cusromerList; this.RepCusList.DataBind(); } #endregion #region 票款 if (model.TicketKindInfoList != null && model.TicketKindInfoList.Count > 0) { foreach (EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfo in model.TicketKindInfoList) { #region 成人 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.成人) { //票面价 this.txtAdultPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.Price.ToString()).ToString("0.00")); //税/机建 this.txtAdultShui.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OilFee.ToString()).ToString("0.00")); //人数 this.txtAdultCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtAdultProxyPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.AgencyPrice.ToString()).ToString("0.00")); //百分比 this.txt_Percent.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString((TicketKindInfo.Discount).ToString("0.00")); //其它费用 this.txt_OtherMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OtherPrice.ToString()).ToString("0.00")); //票款 this.txtAdultSum.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.TotalMoney.ToString()).ToString("0.00")); } #endregion #region 儿童 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.儿童) { //票面价 this.txtChildPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.Price.ToString()).ToString("0.00")); //税/机建 this.txtChildShui.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OilFee.ToString()).ToString("0.00")); //人数 this.txtChildCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtChildProxyPrice.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.AgencyPrice.ToString()).ToString("0.00")); //百分比 this.txt_PercentChild.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString((TicketKindInfo.Discount).ToString("0.00")); //其它费用 this.txt_OtherMoneyChild.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.OtherPrice.ToString()).ToString("0.00")); //票款 this.txtChildSum.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(TicketKindInfo.TotalMoney.ToString()).ToString("0.00")); } #endregion } } #endregion #region 基本信息 //总费用 this.txtSumMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(model.Total.ToString()).ToString("0.00")); //支付方式 this.ddlPayType.SelectedValue = model.PayType.ToString(); //订票须知 this.txtOrderPiaoMust.Value = model.Notice; //PNR this.txtPNR.Value = model.PNR; //售票处 this.txtSalePlace.Value = model.TicketOffice; //供应商编号 this.hd_PiaoWuSuppId.Value = model.TicketOfficeId.ToString(); //票号 this.txtPiaoHao.Value = model.TicketNum; //备注 this.txtMemo.Value = model.Remark; //支付方式 if (model.PayType.ToString() != "0" && model.PayType.ToString() != "") { this.ddlPayType.Items.FindByText(model.PayType.ToString()).Selected = true; } //订单ID this.hdOrderID.Value = model.OrderId; //团号ID this.hdTourID.Value = model.TourId; //线路名称 this.hd_LineName.Value = model.RouteName; #endregion } bll = null; model = null; } }
/// <summary> /// 提交事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_submit_Click(object sender, EventArgs e) { // DateTime date = DateTime.Parse(txt_date.Value); // string leg = txt_Leg.Value; // string gotime = txt_gotime.Value; // string backLeg = txt_backLeg.Value; // string backTime = txt_backTime.Value; // string company = ddl_Com.SelectedValue; // string PNG = txt_PNG.Value; // decimal PiaoKuang = decimal.Parse(txt_PiaoKuang.Value); // decimal dailifei = decimal.Parse( txt_DaiLiFei.Value); // int pepoleNum = int.Parse( txt_Pepole.Value ); // decimal sumPrice = decimal.Parse(txt_SumPrice.Value); // string Order = txt_Order.Value; // for (int i = 0; i < Utils.GetFormValues("txt_code").Length; i++) // { // //do something... // } EyouSoft.Model.TourStructure.TourBaseInfo mb = new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(Utils.GetQueryStringValue("tourid")); if (mb != null) { if (!Utils.PlanIsUpdateOrDelete(mb.Status.ToString())) { Response.Write("<script>alert('该团已提交财务,不能对它操作!');location.href=location.href;</script>"); return; } } UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = new EyouSoft.Model.PlanStructure.TicketOutListInfo(); if (this.hideId.Value != "") { model = bll.GetTicketOutListModel(this.hideId.Value); } if (model != null) { model.CompanyID = cur_companyId; model.Notice = Utils.GetFormValue("txt_Order"); model.OperateID = userInfo.ID; model.Operator = userInfo.ContactInfo.ContactName; model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue("sel_paytype")); model.PNR = Utils.GetFormValue("txt_Pnr"); model.Remark = Utils.GetFormValue("textRemark"); model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请; model.TourId = this.hideTourId.Value; IList <EyouSoft.Model.PlanStructure.TicketFlight> ltf = new List <EyouSoft.Model.PlanStructure.TicketFlight>(); IList <EyouSoft.Model.PlanStructure.TicketKindInfo> ltki = new List <EyouSoft.Model.PlanStructure.TicketKindInfo>(); for (int i = 0; i < Utils.GetFormValues("txt_date").Length; i++) { EyouSoft.Model.PlanStructure.TicketFlight tf = new EyouSoft.Model.PlanStructure.TicketFlight(); tf.TicketTime = Utils.GetFormValues("txt_time")[i]; tf.AireLine = (EyouSoft.Model.EnumType.PlanStructure.FlightCompany)(Utils.GetInt(Utils.GetFormValues("sel_com")[i])); tf.DepartureTime = Utils.GetDateTime(Utils.GetFormValues("txt_date")[i]); tf.Discount = Utils.GetDecimal(Utils.GetFormValues("txt_Discount")[i]); tf.FligthSegment = Utils.GetFormValues("sel_Flight")[i]; ltf.Add(tf); } ////成人票款 EyouSoft.Model.PlanStructure.TicketKindInfo tki = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tki.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui")); tki.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum")); tki.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia")); tki.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan")); tki.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.成人; if (config_Agency.HasValue && EyouSoft.Model.EnumType.CompanyStructure.AgencyFeeType.公式三 == config_Agency.Value) { tki.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); tki.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent"), 100) / 100; tki.AgencyPrice = 0; } else { tki.OtherPrice = 0; tki.Discount = 1; tki.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); } ltki.Add(tki); ///////儿童票款 EyouSoft.Model.PlanStructure.TicketKindInfo tkirt = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tkirt.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui2")); tkirt.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum2")); tkirt.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia2")); tkirt.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan2")); tkirt.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.儿童; tkirt.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent2"), 100) / 100; ltki.Add(tkirt); //// model.Total = Utils.GetDecimal(Utils.GetFormValue("txt_SumPrice")); model.TicketKindInfoList = ltki; model.TicketFlightList = ltf; EyouSoft.BLL.RouteStructure.Route routbll = new EyouSoft.BLL.RouteStructure.Route(userInfo); EyouSoft.BLL.TourStructure.Tour tourbll = new EyouSoft.BLL.TourStructure.Tour(userInfo); model.RouteName = tourbll.GetTourInfo(Utils.GetQueryStringValue("tourId")).RouteName; IList <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo> listorder = new List <EyouSoft.Model.PlanStructure.TicketOutCustomerInfo>(); if (Utils.GetFormValues("chk_md").Length == 0) { Utils.Show("请选择游客!"); return; } IList <EyouSoft.Model.TourStructure.TourOrderCustomer> listcus = new List <EyouSoft.Model.TourStructure.TourOrderCustomer>(); //for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++) //{ // EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo(); // EyouSoft.Model.TourStructure.TourOrderCustomer c = new EyouSoft.Model.TourStructure.TourOrderCustomer(); // c.ID = Utils.GetFormValues("chk_md")[i]; // c.VisitorName = Utils.GetFormValues("txt_name")[i]; // c.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[i]); // c.CradNumber = Utils.GetFormValues("txt_code")[i]; // m.UserId = Utils.GetFormValues("chk_md")[i]; // listorder.Add(m); // listcus.Add(c); //} for (int i = 0; i < Utils.GetFormValues("chk_md").Length; i++) { EyouSoft.Model.PlanStructure.TicketOutCustomerInfo m = new EyouSoft.Model.PlanStructure.TicketOutCustomerInfo(); EyouSoft.Model.TourStructure.TourOrderCustomer c = new EyouSoft.Model.TourStructure.TourOrderCustomer(); c.ID = Utils.GetFormValues("chk_md")[i]; for (int j = 0; j < Utils.GetFormValues("txt_name").Length; j++) { if (c.ID == Utils.GetFormValues("hd_uid")[j]) { c.VisitorName = Utils.GetFormValues("txt_name")[j]; c.CradType = (EyouSoft.Model.EnumType.TourStructure.CradType)Utils.GetInt(Utils.GetFormValues("sel_cred")[j]); c.CradNumber = Utils.GetFormValues("txt_code")[j]; break; } } m.UserId = Utils.GetFormValues("chk_md")[i]; listorder.Add(m); listcus.Add(c); } model.CustomerInfoList = listcus; model.TicketOutCustomerInfoList = listorder; //if (Utils.GetInt(Utils.GetQueryStringValue("type")) == 1) //{ // ///散拼计划机票计调 // model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.订单申请机票; //} //else //{ ///团队计划机票计调 model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.团队申请机票; //} //model.TicketOutId = "0"; model.RegisterOperatorId = userInfo.ID; //售票处 model.TicketOffice = this.txtSalePlace.Value; model.TicketOfficeId = Utils.GetInt(this.hd_PiaoWuSuppId.Value); if (this.hideId.Value != "") { //修改 model.TicketOutId = this.hideId.Value; if (bll.UpdateTicketOutListModel(model)) { Utils.ShowAndRedirect("修改成功!", Request.Url.ToString()); } else { Utils.ShowAndRedirect("修改失败!", Request.Url.ToString()); } } else { //添加 if (bll.addTicketOutListModel(model)) { Utils.ShowAndRedirect("添加成功!", Request.Url.ToString()); } else { Utils.ShowAndRedirect("添加失败!", Request.Url.ToString()); } } } }
/// <summary> /// 绑定信息 /// </summary> void BindInfo() { //EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(Request.QueryString["id"]); //; EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); UserInfo userInfo = null; bool _IsLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(out userInfo); EyouSoft.BLL.TourStructure.TourOrder orderbll = new EyouSoft.BLL.TourStructure.TourOrder(userInfo); //string orderId = orderbll.GetOrderIdByTourId(Request.QueryString["tourId"]); if (Utils.GetQueryStringValue("tourId") != "") { string tourId = Utils.GetQueryStringValue("tourId"); this.hideTourId.Value = tourId; CustomerList = bll.CustomerList(Utils.GetQueryStringValue("tourId")); cusList = orderbll.GetTravellers(tourId);//.Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); for (int i = cusList.Count - 1; i >= 0; i--) { if (!CustomerList.Contains(cusList[i].ID)) { if (cusList[i].CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.已退团) { cusList.RemoveAt(i); } } } rpt_list.DataSource = cusList; count = 10; rpt_list.DataBind(); } if (Utils.GetString(Request.QueryString["id"], "") != "") { this.hideId.Value = Utils.GetString(Request.QueryString["id"], ""); modelinfo = bll.GetTicketOutListModel(Request.QueryString["id"]); if (modelinfo != null) { rpt_hangbang.DataSource = modelinfo.TicketFlightList; rpt_hangbang.DataBind(); if (modelinfo.TicketKindInfoList != null) { piaomianjia = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().Price); shui = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().OilFee); pepoleNum = modelinfo.TicketKindInfoList.FirstOrDefault().PeopleCount.ToString(); DaiLiFei = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().AgencyPrice); piaokuan = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().TotalMoney); OtherMoney = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().OtherPrice); Percent = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList.FirstOrDefault().Discount * 100); if (modelinfo.TicketKindInfoList.Count > 1) { piaomianjia2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].Price); shui2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].OilFee); pepoleNum2 = modelinfo.TicketKindInfoList[1].PeopleCount.ToString(); DaiLiFei2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].AgencyPrice); piaokuan2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].TotalMoney); OtherMoney2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].OtherPrice); Percent2 = Utils.FilterEndOfTheZeroDecimal(modelinfo.TicketKindInfoList[1].Discount * 100); } } Png = modelinfo.PNR; Total = Utils.FilterEndOfTheZeroDecimal(modelinfo.Total); paytype = modelinfo.PayType.ToString(); Notice = modelinfo.Notice; Remark = modelinfo.Remark; //售票处 this.txtSalePlace.Value = modelinfo.TicketOffice; this.hd_PiaoWuSuppId.Value = modelinfo.TicketOfficeId.ToString(); } } }
/// <summary> /// 提交事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void lbtn_submit_Click(object sender, EventArgs e) { EyouSoft.Model.PlanStructure.TicketOutListInfo model = new EyouSoft.Model.PlanStructure.TicketOutListInfo(); model.TourId = Utils.GetQueryStringValue("tourId"); model.CompanyID = this.SiteUserInfo.CompanyID; model.OperateID = SiteUserInfo.ID; if (SiteUserInfo.ContactInfo != null) { model.Operator = SiteUserInfo.ContactInfo.ContactName; } model.OrderId = orderId; #region 成人儿童票款 IList <EyouSoft.Model.PlanStructure.TicketKindInfo> ltki = new List <EyouSoft.Model.PlanStructure.TicketKindInfo>(); ////成人票款 EyouSoft.Model.PlanStructure.TicketKindInfo tki = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tki.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui")); tki.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum")); tki.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia")); tki.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan")); tki.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.成人; if (config_Agency.HasValue && EyouSoft.Model.EnumType.CompanyStructure.AgencyFeeType.公式三 == config_Agency.Value) { tki.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); tki.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent"), 100) / 100; tki.AgencyPrice = 0; } else { tki.OtherPrice = 0; tki.Discount = 1; tki.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei")); } ltki.Add(tki); ///////儿童票款 EyouSoft.Model.PlanStructure.TicketKindInfo tkirt = new EyouSoft.Model.PlanStructure.TicketKindInfo(); tkirt.AgencyPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.OilFee = Utils.GetDecimal(Utils.GetFormValue("txt_shui2")); tkirt.PeopleCount = Utils.GetInt(Utils.GetFormValue("txt_pepoleNum2")); tkirt.Price = Utils.GetDecimal(Utils.GetFormValue("txt_piaomianjia2")); tkirt.TotalMoney = Utils.GetDecimal(Utils.GetFormValue("txt_piaokuan2")); tkirt.TicketType = EyouSoft.Model.EnumType.PlanStructure.KindType.儿童; tkirt.OtherPrice = Utils.GetDecimal(Utils.GetFormValue("txt_DaiLiFei2")); tkirt.Discount = Utils.GetDecimal(Utils.GetFormValue("txt_Percent2"), 100) / 100; ltki.Add(tkirt); #endregion model.TicketKindInfoList = ltki; model.PNR = Utils.GetFormValue("txt_PNR"); model.Total = Utils.GetDecimal(Utils.GetFormValue("txt_SumPrice")); model.PayType = (EyouSoft.Model.EnumType.TourStructure.RefundType)Utils.GetInt(Utils.GetFormValue(ddl_PayType.UniqueID)); model.Notice = Utils.GetFormValue("txt_Order"); model.Remark = Utils.GetFormValue("txt_Remark"); model.RouteName = Utils.GetFormValue("hidRouteName"); model.OrderId = Utils.GetFormValue("hidOrderId"); model.CustomerInfoList = null; model.State = EyouSoft.Model.EnumType.PlanStructure.TicketState.机票申请; model.TicketType = EyouSoft.Model.EnumType.PlanStructure.TicketType.团队申请机票; model.RegisterOperatorId = SiteUserInfo.ID; model.TicketOutTime = DateTime.Now; EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (Utils.GetFormValue("hidIsExtsisTicket") == "1") { //修改 model.TicketOutId = this.hideId.Value; if (bll.UpdateTicketOutListModel(model)) { EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, string.Format("alert('修改成功');window.parent.Boxy.getIframeDialog('{0}').hide();window.parent.location.reload();", Utils.GetQueryStringValue("iframeId"))); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, string.Format("alert('修改失败');")); } } else { //添加 if (bll.addTicketOutListModel(model)) { EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, string.Format("alert('添加成功');window.parent.Boxy.getIframeDialog('{0}').hide();window.parent.location.reload();", Utils.GetQueryStringValue("iframeId"))); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this.Page, string.Format("alert('添加成功')")); } } }
protected void Page_Load(object sender, EventArgs e) { #region ajax删除 if (Utils.GetQueryStringValue("act") == "del") { Response.Clear(); EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); if (Utils.GetQueryStringValue("id") != "") { 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("-1"); } else { //删除操作 int i = bll.DeleteTicket(Utils.GetQueryStringValue("id")); Response.Write(i.ToString()); } } } Response.End(); return; } #endregion #region 绑定 if (!IsPostBack) { config_Agency = new EyouSoft.BLL.CompanyStructure.CompanySetting().GetAgencyFee(CurrentUserCompanyID); BindList(); if (Utils.GetInt(Utils.GetQueryStringValue("type")) == 1) { lt_jihua.Text = "散拼计划"; if (CheckGrant(TravelPermission.散拼计划_散拼计划_申请机票)) { this.Page.Title = "申请机票_散拼计划"; } else { Utils.ResponseNoPermit(TravelPermission.散拼计划_散拼计划_申请机票, false); } } else { lt_jihua.Text = "团队计划"; if (CheckGrant(TravelPermission.团队计划_团队计划_申请机票)) { this.Page.Title = "申请机票_团队计划"; } else { Utils.ResponseNoPermit(TravelPermission.团队计划_团队计划_申请机票, false); } } } #endregion #region 当前用户 jipiaoUpdate1.userId = SiteUserInfo.ID; jipiaoUpdate1.username = SiteUserInfo.UserName; jipiaoUpdate1.cur_companyId = CurrentUserCompanyID; #endregion }
private void onInit() { BindPayType(); //证件类型绑定 CusCardTypeBind(); //航空公司绑定 AirCompanyTypeBind(); string id = Utils.GetQueryStringValue("id"); if (id != "") { EyouSoft.BLL.PlanStruture.PlaneTicket bll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = bll.GetTicketOutListModel(id); if (model != null) { #region 航班 if (model.TicketFlightList != null && model.TicketFlightList.Count > 0) { RepAirList.DataSource = model.TicketFlightList; RepAirList.DataBind(); } #endregion #region 单 if (model.CustomerInfoList != null && model.CustomerInfoList.Count > 0) { this.RepCusList.DataSource = model.CustomerInfoList; this.RepCusList.DataBind(); } #endregion #region 票款 if (model.TicketKindInfoList != null && model.TicketKindInfoList.Count > 0) { foreach (EyouSoft.Model.PlanStructure.TicketKindInfo TicketKindInfo in model.TicketKindInfoList) { #region 成人 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.成人) { //票面价 this.txtAdultPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price); //税/机建 this.txtAdultShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee); //人数 this.txtAdultCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtAdultProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice); //票款 this.txtAdultSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney); //百分比 txt_Percent.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount); txt_DaiLiFei.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice); } #endregion #region 儿童 if (TicketKindInfo.TicketType == EyouSoft.Model.EnumType.PlanStructure.KindType.儿童) { //票面价 this.txtChildPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Price); //税/机建 this.txtChildShui.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OilFee); //人数 this.txtChildCount.Value = TicketKindInfo.PeopleCount.ToString(); //代理费 this.txtChildProxyPrice.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.AgencyPrice); //票款 this.txtChildSum.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.TotalMoney); txt_Percent2.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.Discount); txt_DaiLiFei2.Value = FilterEndOfTheZeroDecimal(TicketKindInfo.OtherPrice); } #endregion } } #endregion #region 基本信息 //总费用 this.txtSumMoney.Value = EyouSoft.Common.Utils.FilterEndOfTheZeroString(EyouSoft.Common.Utils.GetDecimal(model.TotalAmount.ToString()).ToString("0.00")); //支付方式 this.ddlPayType.SelectedValue = model.PayType.ToString(); //订票须知 this.txtOrderPiaoMust.Value = model.Notice; //PNR this.txtPNR.Value = model.PNR; //售票处 this.txtSalePlace.Value = model.TicketOffice; //票号 this.txtPiaoHao.Value = model.TicketNum; //备注 this.txtMemo.Value = model.Remark; if (model.PayType.ToString() != "0" && model.PayType.ToString() != "") { this.ddlPayType.Items.FindByText(model.PayType.ToString()).Selected = true; } //订单ID this.hdOrderID.Value = model.OrderId; //团号ID this.hdTourID.Value = model.TourId; #endregion } bll = null; model = null; } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> private void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); EyouSoft.Model.TourStructure.TourInfo infoModel = null; EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null; if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { infoModel = (EyouSoft.Model.TourStructure.TourInfo)model; } else { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; } this.lblTourCode.Text = model.TourCode; this.lblAreaName.Text = model.RouteName; this.lblBenginDate.Text = model.LDate.ToString("yyyy-MM-dd"); this.lblEndDate.Text = model.RDate.ToString("yyyy-MM-dd"); #region 结算价 if (EyouSoft.Model.EnumType.TourStructure.TourType.团队计划 == model.TourType) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, teamModel.TourTeamUnit, ref number, ref money); this.lblCount.Text = number; } #endregion //this.lblCount.Text = model.PlanPeopleNumber.ToString(); this.lblTeamPrice.Text = Utils.FilterEndOfTheZeroString(model.TotalIncome.ToString("0.00")); this.lblMeter.Text = ""; //票务 this.lblTicket.Text = ""; //团 利 润 this.lblProfit.Text = Utils.FilterEndOfTheZeroString((model.TotalIncome + model.TotalOtherIncome - model.TotalExpenses - model.TotalOtherExpenses - model.DistributionAmount).ToString("0.00")); //备注 this.lblRemarks.Text = ""; //绑定旅客信息 List <EyouSoft.Model.TourStructure.TourOrder> lorder = new List <EyouSoft.Model.TourStructure.TourOrder>(); EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel (SiteUserInfo.CompanyID, orderId); if (customerList != null) { EyouSoft.BLL.CompanyStructure.Customer cinfo = new EyouSoft.BLL.CompanyStructure.Customer(); EyouSoft.Model.CompanyStructure.CustomerInfo cm = cinfo.GetCustomerModel(customerList.BuyCompanyID); if (cm != null) { customerList.BuyCompanyName = cm.Name; } lorder.Add(customerList); } this.rptCustomer.DataSource = lorder; this.rptCustomer.DataBind(); //获得该计划下的所有地接的集合 EyouSoft.BLL.PlanStruture.TravelAgency travelBll = new EyouSoft.BLL.PlanStruture.TravelAgency(); IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> travelList = travelBll.GetList(tourId); if (travelList != null && travelList.Count > 0) { rptDjPriceTDCount = travelList.Count * 2; } this.rptDjPrice.DataSource = travelList; this.rptDjPrice.DataBind(); //添加地接备注 if (travelList != null && travelList.Count > 0) { for (int i = 0; i < travelList.Count; i++) { this.lblRemarks.Text += travelList[i].Remark + "<br />"; } } //机票费列表 EyouSoft.BLL.PlanStruture.PlaneTicket ticketBll = new EyouSoft.BLL.PlanStruture.PlaneTicket(); IList <EyouSoft.Model.PlanStructure.MLBTicketApplyInfo> ticketList = ticketBll.GetTicketApplys(CurrentUserCompanyID, tourId); if (ticketList != null && ticketList.Count > 0) { rptTicketPriceTDCount = ticketList.Count * 3; } this.rptTicketPrice.DataSource = ticketList; this.rptTicketPrice.DataBind(); //添加机票备注 if (ticketList != null && ticketList.Count > 0) { for (int i = 0; i < ticketList.Count; i++) { this.lblRemarks.Text += ticketList[i].Remark; } } //获得计调信息 IList <string> coordList = new EyouSoft.BLL.TourStructure.Tour().GetTourCoordinators(tourId); if (coordList != null && coordList.Count > 0) { for (int i = 0; i < coordList.Count; i++) { this.lblMeter.Text += coordList[i] + "<br />"; } } //获得票务信息 IList <string> operatorList = new EyouSoft.BLL.PlanStruture.PlaneTicket().CustomerOperatorList(tourId); if (operatorList != null && operatorList.Count > 0) { for (int i = 0; i < operatorList.Count; i++) { this.lblTicket.Text += operatorList[i] + "<br />"; } } }