protected void Page_Load(object sender, EventArgs e) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tModel = bll.GetTourInfo(Utils.GetQueryStringValue("tourId")); if (tModel != null) { if (tModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)tModel; Bind(model); } else { EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)tModel; Bind(model); } } else { Response.Clear(); Response.Write("未找到信息!"); Response.End(); } }
/// <summary> /// 专线端添加报价并生成团队计划 /// </summary> /// <param name="info">团队计划列表信息业务实体</param> /// <param name="LineInquireQuoteInfo">线路询价报价实体类</param> /// <returns></returns> public bool AddQuote(EyouSoft.Model.TourStructure.TourTeamInfo info, EyouSoft.Model.TourStructure.LineInquireQuoteInfo LineInquireQuoteInfo) { if (LineInquireQuoteInfo.CompanyId == 0 || LineInquireQuoteInfo.Id == 0) { return(false); } if (QuoteSuccessInsertPlan(LineInquireQuoteInfo.Id, info)) { //同步组团询价游客信息到团队计划订单 dal.SyncQuoteTravellerToTourTeamOrder(LineInquireQuoteInfo.Id, info.TourId); LineInquireQuoteInfo.QuoteState = EyouSoft.Model.EnumType.TourStructure.QuoteState.已成功; if (dal.UpdateQuote(LineInquireQuoteInfo)) { #region LGWR EyouSoft.Model.CompanyStructure.SysHandleLogs logInfo = new EyouSoft.Model.CompanyStructure.SysHandleLogs(); logInfo.CompanyId = 0; logInfo.DepatId = 0; logInfo.EventCode = EyouSoft.Model.CompanyStructure.SysHandleLogsNO.EventCode; logInfo.EventIp = string.Empty; logInfo.EventMessage = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "{0}在" + EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价.ToString() + "添加了一条报价,编号:" + LineInquireQuoteInfo.Id; logInfo.EventTime = DateTime.Now; logInfo.EventTitle = "添加报价"; logInfo.ModuleId = EyouSoft.Model.EnumType.CompanyStructure.SysPermissionClass.团队计划_组团社询价; logInfo.OperatorId = 0; this.Logwr(logInfo); return(true); #endregion } } return(false); }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; //天数 this.lblDay.Text = model.TourDays.ToString(); //成人数 this.lblAdult.Text = model.PlanPeopleNumber.ToString(); //儿童数 //出发交通 this.lblBegin.Text = model.LTraffic; //返程交通 this.lblEnd.Text = model.RTraffic; if (model.TourQuickInfo != null) { //行程安排 this.litTravel.Text = model.TourQuickInfo.QuickPlan; //服务标准 this.litService.Text = model.TourQuickInfo.Service; } //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null && model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { #region 页面控件赋值 //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; //人数 this.lblAdult.Text = model.PlanPeopleNumber.ToString(); //天数 this.lblDayCount.Text = model.TourDays.ToString(); //出发交通 this.lblBegin.Text = model.LTraffic; //返程交通 this.lblEnd.Text = model.RTraffic; //出团日期 LeaveDate = model.LDate; if (model.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //儿童安排 this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //自费项目 this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提示 this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); //行程安排 this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); } //包含项目 //包含项目 if (model.Services != null) { tdCount = model.Services.Count * 2; } this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); #endregion } }
/// <summary> /// 专线端报价成功后生成快速发布计划 /// </summary> /// <param name="QuoteId">报价编号</param> /// <param name="info">团队计划信息实体</param> /// <returns></returns> private bool QuoteSuccessInsertPlan(int QuoteId, EyouSoft.Model.TourStructure.TourTeamInfo info) { Tour TourBll = new Tour(); //插团队计划 if (TourBll.InsertTeamTourInfo(info) > 0) { return(dal.QuoteAddPlanNo(QuoteId, info.TourId, info.OperatorId)); } return(false); }
/// <summary> /// 判断是否有传值 /// </summary> protected void InitRouteInfo() { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourTeamInfo tourInfo = bll.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.TourTeamInfo; if (tourInfo == null) { Response.Clear(); Response.Write("未找到信息"); Response.End(); } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; //天数 this.lblDay.Text = model.TourDays.ToString(); #region 人数And结算价 if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); this.lblAdult.Text = number; } else { this.lblAdult.Text = model.PlanPeopleNumber.ToString(); } #endregion //出发交通 this.lblBegin.Text = model.LTraffic; //返程交通 this.lblEnd.Text = model.RTraffic; if (model.TourQuickInfo != null) { //行程安排 this.litTravel.Text = model.TourQuickInfo.QuickPlan; //服务标准 this.litService.Text = model.TourQuickInfo.Service; } //地接社信息 this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); } }
/// <summary> /// 初始化线路信息 /// </summary> protected void InitRouteInfo() { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourTeamInfo tourInfo = bll.GetTourInfo(tourId) as EyouSoft.Model.TourStructure.TourTeamInfo; if (tourInfo == null) { Response.Clear(); Response.Write("未找到信息"); Response.End(); } ltrTourNumber.Text = tourInfo.TourCode; ltrRouteName.Text = tourInfo.RouteName; ltrDays.Text = tourInfo.TourDays.ToString(); }
protected string GetPrintUrl(string tourId) { string Url = string.Empty; //声明bll对象 EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tourModel = tourBll.GetTourInfo(tourId); //声明bll对象 EyouSoft.BLL.CompanyStructure.CompanySetting bll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //判断该计划是团队计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)tourModel; //行程单 if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //团队计划快速发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划快速发布行程单); } else { //团队计划标准版发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划标准发布行程单); } } //判断该计划是散拼计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo teamModel = (EyouSoft.Model.TourStructure.TourInfo)tourModel; if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //散拼计划快速发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划标准发布行程单); } if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //散拼计划标准发布行程单 Url = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划快速发布行程单); } } return(Url); }
/// <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.TourTeamInfo teamModel = null; if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (teamModel != null) { //组团社 this.txtGroups.Text = teamModel.BuyerCName; //联系人 this.txtContact.Text = ""; //电话 this.txtPhone.Text = ""; //预计出团日期 this.txtOutDate.Text = teamModel.LDate.ToString("yyyy-MM-dd"); //人数 string number = string.Empty; string money = string.Empty; getPepoleNum(SiteUserInfo.CompanyID, teamModel.PlanPeopleNumber, teamModel.TourTeamUnit, ref number, ref money); this.txtCount.Text = number; this.txtBaoJia.Text = money; //传真 this.txtFax.Text = ""; //线路名称 this.txtAreaName.Text = teamModel.RouteName; //出团日期 this.LeaveTime = teamModel.LDate; //地接总价 this.lblAllPrice.Text = teamModel.TotalAmount.ToString("0.00"); //判断时候有报价ID if (teamModel.QuoteId > 0) { //获得报价model EyouSoft.Model.RouteStructure.QuoteTeamInfo routeModel = new EyouSoft.BLL.RouteStructure.Quote().GetQuoteInfo(teamModel.QuoteId); if (routeModel != null) { //获得客户要求列表 if (routeModel.Requirements != null && routeModel.Requirements.Count > 0) { //绑定具体要求列表 this.rptRequire.DataSource = routeModel.Requirements; tdCount = routeModel.Requirements.Count; this.rptRequire.DataBind(); this.RecordSum = routeModel.Requirements.Count; } else { this.pnlContent.Visible = false; style = "padding: 0px; margin: 0px;border-bottom: none;"; this.pnlSpecific.Visible = false; } } } else { //如果不存在报价 那么隐藏具体要求 this.pnlContent.Visible = false; style = "padding: 0px; margin: 0px;border-bottom: none;"; this.pnlSpecific.Visible = false; } //行程安排 数据绑定 if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { if (teamModel.TourNormalInfo != null && teamModel.TourNormalInfo.Plans != null) { this.rptTravel.DataSource = teamModel.TourNormalInfo.Plans; this.rptTravel.DataBind(); tdCount = teamModel.TourNormalInfo.Plans.Count; this.pnlSecond.Visible = false; } } else { if (teamModel.TourQuickInfo != null) { this.lblSecond.Text = teamModel.TourQuickInfo.QuickPlan; } this.pnlFrist.Visible = false; } //地接信息 数据绑定 if (teamModel.Services != null && teamModel.Services.Count > 0) { this.RecordSumS = teamModel.Services.Count; this.rptDjList.DataSource = teamModel.Services; this.rptDjList.DataBind(); } } } }
/// <summary> /// 团队计划出团任务书 /// </summary> /// <param name="model"></param> private void Bind(EyouSoft.Model.TourStructure.TourTeamInfo model) { //发团时间 xcTime = model.LDate; //出发交通 lblGoTraffic.Text = model.LTraffic; //返回交通 lblEndTraffic.Text = model.RTraffic; //出团时间 lblLDate.Text = model.LDate.ToShortDateString(); //联系人 EyouSoft.BLL.CompanyStructure.CompanyUser csBLL = new EyouSoft.BLL.CompanyStructure.CompanyUser(); string SentPeoples = ""; //判断是否有联系人 if (model.SentPeoples.Count >= 0) { for (int i = 0; i < model.SentPeoples.Count; i++) { //联系人数据 SentPeoples = ""; string tel = csBLL.GetUserBasicInfo(model.SentPeoples[i].OperatorId).ContactTel; SentPeoples += "联系人:" + model.SentPeoples[i].OperatorName + "" + tel; } } else { SentPeoples = "暂无联系人"; } //联系人 lblSentPeoples.Text = SentPeoples; //集合时间 lblGatheringTime.Text = model.GatheringTime; //集合地点 lblGatheringPlace.Text = model.GatheringPlace; //集合标志 lblGatheringSign.Text = model.GatheringSign; //返航时间 lblRTraffic.Text = model.RTraffic; //线路名称 lblRouteName.Text = model.RouteName; //地接安排 if (model.LocalAgencys != null) { rptlist.DataSource = model.LocalAgencys; rptlist.DataBind(); } //标准发布 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { //标准发布数据不为空 if (model.TourNormalInfo != null) { //行程信息 xc_list.DataSource = model.TourNormalInfo.Plans; xc_list.DataBind(); //不包含项目 lblBuHanXiangMu.Text = model.TourNormalInfo.BuHanXiangMu; //自费项目 lblZiFeiXIangMu.Text = model.TourNormalInfo.ZiFeiXIangMu; //儿童安排 lblErTongAnPai.Text = model.TourNormalInfo.ErTongAnPai; //购物安排 lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai; //购物安排 lblGouWuAnPai.Text = model.TourNormalInfo.GouWuAnPai; //注意事项 lblZhuYiShiXiang.Text = model.TourNormalInfo.ZhuYiShiXiang; //包含项目数据绑定 rpt_sList.DataSource = model.Services; rpt_sList.DataBind(); //显示标准 pnlProject.Visible = true; //隐藏快速 xcquick.Visible = false; } //lt_desc.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); } else//快速发布 { //隐藏标准 pnlProject.Visible = false; //显示快速 xcquick.Visible = true; if (model.TourQuickInfo != null) { lblQuickPlan.Text = model.TourQuickInfo.QuickPlan; lblKs.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark); } } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click(object sender, EventArgs e) { NumConfig = (int)(new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(CurrentUserCompanyID)); #region 将表单值赋值于变量 //团号 string teamNum = this.txtTeamNum.Text.Trim(); //线路区域名 string lineArea = Utils.GetFormValue(this.ddlLineArea.UniqueID); //计调员 string coordinatorId = Utils.GetFormValue(this.ddlSeller.UniqueID); //线路名称 string xianLuName = this.xianluWindow1.Name; //线路ID string routeId = this.xianluWindow1.Id; //组团社ID int buyerCId = Utils.GetInt(this.hideGroupsId.Value); //组团社名称 string buyerCName = Utils.GetFormValue(this.txtGroupsName.UniqueID); //天数 int?dayCount = Utils.GetIntNull(this.txtDayCount.Text); //人数 int?peopleCount = Utils.GetIntNull(this.txtPeopelCount.Text); //出发交通 string startTraffic = this.txtStartTraffic.Text.Trim(); //返程交通 string endTraffic = this.txtEndTraffic.Text.Trim(); //出团日期 DateTime lDate = Utils.GetDateTime(this.txtLDate.Text); //不含项目 string noProject = this.txtNoProject.Text.Trim(); //购物安排 string buyPlan = this.txtBuyPlan.Text; //儿童安排 string childPlan = this.txtChildPlan.Text; //自费项目 string selfProject = this.txtSelfProject.Text; //注意事项 string note = this.txtNote.Text; //温馨提示 string tips = this.txtTips.Text; //内部信息 string internalMsg = this.txtNeiBu.Text; //集合时间 //string gatheredTime = (Utils.GetFormValue(this.txtGathered.UniqueID)) + " " + ddl_jh_date.SelectedValue + ":00:00"; string gatheredTime = Utils.GetFormValue(this.txtGathered.UniqueID); //集合地点 string place = Utils.GetFormValue(this.txtPlace.UniqueID); //集合标志 string logo = Utils.GetFormValue(this.txtLogo.UniqueID); //送团人 string operatorId = this.selectOperator1.OperId; //常用城市 int tourCity = Utils.GetInt(Utils.GetFormValue(this.ddlCityList.UniqueID)); #endregion #region 验证上传文件的格式是否正确 string msg = ""; if (!EyouSoft.Common.Function.UploadFile.CheckFileType(Request.Files, "fileField", new[] { ".gif", ".jpeg", ".jpg", ".png", ".xls", ".doc", ".docx", ".rar", ".txt" }, null, out msg)) { this.litMsg.Text = Utils.ShowMsg(msg); return; } #endregion #region 地接信息 IList <EyouSoft.Model.TourStructure.TourLocalAgencyInfo> djList = this.DiJieControl1.GetList; #endregion #region 行程安排 IList <EyouSoft.Model.TourStructure.TourPlanInfo> planList = this.xingcheng1.GetValues(); #endregion #region 包含项目 IList <EyouSoft.Model.TourStructure.TourTeamServiceInfo> standList = this.PriceControl1.GetList; #endregion #region 验证 if (lineArea == "") { this.litMsg.Text = Utils.ShowMsg("请选择线路区域!"); return; } //判断是否选择组团社 if (buyerCId <= 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择组团社!")); return; } if (xianLuName == "") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入线路名称!")); return; } if (coordinatorId == "-1") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择计调员!")); return; } if (dayCount == null || dayCount == 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入天数!")); return; } if ((peopleCount == null || peopleCount == 0) && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.OnlyTotalNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } int crNum = Utils.GetInt(txt_crNum.Text); if (crNum == 0 && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } #endregion //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明model对象 EyouSoft.Model.TourStructure.TourTeamInfo model = new EyouSoft.Model.TourStructure.TourTeamInfo(); //如果是修改那么先获得该对象model if (this.hideType.Value == "Update") { //如果是修改操作,那么先获的这个对象 model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(this.hideID.Value); } //判断对象是否存在 if (model != null) { #region 对象属性赋值 model.TourCode = teamNum; model.AreaId = Convert.ToInt32(lineArea); //修改时原购买单位 if (model.BuyerCId > 0) { model.OBuyerCId = model.BuyerCId; } model.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); model.Coordinator.CoordinatorId = Utils.GetInt(coordinatorId); model.BuyerCId = buyerCId; model.BuyerCName = buyerCName; model.RouteName = xianLuName; if (model.RouteId != 0) { model.ORouteId = model.RouteId; } model.RouteId = Utils.GetInt(routeId); model.TourDays = Convert.ToInt32(dayCount); #region 添加送团人 if (this.selectOperator1.OperId.Trim() != "") { string[] operIdList = this.selectOperator1.OperId.Split(','); if (operIdList.Count() > 0) { model.SentPeoples = new List <EyouSoft.Model.TourStructure.TourSentPeopleInfo>(); for (int i = 0; i < operIdList.Count(); i++) { if (operIdList[i].Trim() != "") { EyouSoft.Model.TourStructure.TourSentPeopleInfo sentPeopleModel = new EyouSoft.Model.TourStructure.TourSentPeopleInfo(); sentPeopleModel.OperatorId = Utils.GetInt(operIdList[i]); model.SentPeoples.Add(sentPeopleModel); } } } } #endregion model.GatheringPlace = place; model.GatheringSign = logo; model.GatheringTime = gatheredTime; model.PlanPeopleNumber = Convert.ToInt32(peopleCount); model.LTraffic = startTraffic; model.RTraffic = endTraffic; model.LDate = lDate; model.LocalAgencys = djList; EyouSoft.Model.TourStructure.TourTeamNormalPrivateInfo tourTeamModel = new EyouSoft.Model.TourStructure.TourTeamNormalPrivateInfo(); tourTeamModel.Plans = planList; tourTeamModel.BuHanXiangMu = noProject; tourTeamModel.GouWuAnPai = buyPlan; tourTeamModel.ErTongAnPai = childPlan; tourTeamModel.ZiFeiXIangMu = selfProject; tourTeamModel.ZhuYiShiXiang = note; tourTeamModel.WenXinTiXing = tips; tourTeamModel.NeiBuXingXi = internalMsg; model.TourNormalInfo = tourTeamModel; model.Services = standList; model.CompanyId = SiteUserInfo.CompanyID; model.OperatorId = SiteUserInfo.ID; model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.团队计划; model.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal; model.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None; model.TotalAmount = PriceControl1.TotalAmount; //model.SelfUnitPriceAmount = PriceControl1.OnePriceAll; model.TourCityId = tourCity; model.TourTraffic = new List <int>() { Utils.GetInt(Utils.GetFormValue("selectTraffic"), -1) }; ///人数、单价 by txb model.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo(); model.TourTeamUnit.NumberCr = Utils.GetInt(txt_crNum.Text); model.TourTeamUnit.NumberEt = Utils.GetInt(txt_rtNum.Text); model.TourTeamUnit.NumberQp = Utils.GetInt(txt_allNum.Text); model.TourTeamUnit.UnitAmountCr = PriceControl1.cr_price; model.TourTeamUnit.UnitAmountEt = PriceControl1.rt_price; model.TourTeamUnit.UnitAmountQp = PriceControl1.all_price; #endregion #region 单文件 //团队附件实体 EyouSoft.Model.TourStructure.TourAttachInfo attachModel = new EyouSoft.Model.TourStructure.TourAttachInfo(); //文件路径 string filePath = ""; //文件名 string fileName = ""; //文件上传 if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fileField"], "TeamPlanFile", out filePath, out fileName)) { if (filePath.Trim() != "" && fileName.Trim() != "") { //设置文件上传后的虚拟路劲 attachModel.FilePath = filePath; //保存原文件名 attachModel.Name = fileName; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else if (this.hideData.Value.Trim() != "") { //设置文件上传后的虚拟路劲 attachModel.FilePath = this.hideData.Value; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else { model.Attachs = null; } } else { //上传失败提示 this.litMsg.Text = Utils.ShowMsg("文件上传失败!"); return; } #endregion #region 数据操作 int count = 0; if (model.TourTraffic != null && model.TourTraffic.Count > 0) { EyouSoft.BLL.PlanStruture.PlanTrffic BLL = new EyouSoft.BLL.PlanStruture.PlanTrffic(); EyouSoft.Model.PlanStructure.TrafficPricesInfo TrafficPricesInfoModel = BLL.GetTrafficPriceModel(model.TourTraffic.First(), model.LDate); if (TrafficPricesInfoModel != null && TrafficPricesInfoModel.TicketNums > 0) { //新增和复制操作时 进行数据添加操作 if (this.hideType.Value == "Add" || this.hideType.Value == "Copy") { //数据库添加操作 count = bll.InsertTeamTourInfo(model); //新增成功 if (count > 0) { Utils.ShowAndRedirect("添加成功!", "/TeamPlan/TeamPlanList.aspx"); } else //失败时提示 if (count == -1) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('团号重复!');"); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('添加失败!');"); } } else { //数据库修改操作 count = bll.UpdateTeamTourInfo(model); //成功提示 if (count > 0) { Utils.ShowAndRedirect("修改成功!", "/TeamPlan/TeamPlanList.aspx"); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, "javascript:alert('修改失败!');"); } } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通票数为零!');location.href=location.href;</script>"); } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通为空!');location.href=location.href;</script>"); } #endregion } else { Utils.ShowAndRedirect("该计划不存在!", "/TeamPlan/TeamPlanList.aspx"); } }
protected void CreatQuicklyTeam() { int id = Convert.ToInt32(Utils.GetQueryStringValue("id")); EyouSoft.Model.TourStructure.LineInquireQuoteInfo lineInfo = SaveInfo(id); //生成页面上取值后的lineInfo EyouSoft.Model.RouteStructure.RouteInfo route = new EyouSoft.Model.RouteStructure.RouteInfo(); //生成线路信息 EyouSoft.BLL.RouteStructure.Route routeBll = new EyouSoft.BLL.RouteStructure.Route(); //routeBll类 EyouSoft.Model.TourStructure.TourTeamInfo tourTeamInfo = new EyouSoft.Model.TourStructure.TourTeamInfo(); //生成团队计划类 //获取线路 route = routeBll.GetRouteInfo(lineInfo.RouteId); //客户单位编号 tourTeamInfo.BuyerCId = lineInfo.CustomerId; //客户单位名称 tourTeamInfo.BuyerCName = lineInfo.CustomerName; //公司编号 tourTeamInfo.CompanyId = lineInfo.CompanyId; //出团日期 tourTeamInfo.LDate = (DateTime)lineInfo.LeaveDate; //线路编号 tourTeamInfo.RouteId = lineInfo.RouteId; //线路名称 tourTeamInfo.RouteName = lineInfo.RouteName; //客户单位编号 tourTeamInfo.BuyerCId = lineInfo.CustomerId; //客户单位名称 tourTeamInfo.BuyerCName = lineInfo.CustomerName; //公司编号 tourTeamInfo.CompanyId = lineInfo.CompanyId; //发布人编号 tourTeamInfo.OperatorId = SiteUserInfo.ID; //总人数 tourTeamInfo.PlanPeopleNumber = lineInfo.PeopleNum; //团队计划发布类型 tourTeamInfo.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick; if (new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(SiteUserInfo.CompanyID) == EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { tourTeamInfo.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo() { NumberCr = tourTeamInfo.PlanPeopleNumber, NumberEt = 0, NumberQp = 0, UnitAmountCr = 0, UnitAmountEt = 0, UnitAmountQp = 0 }; } else { tourTeamInfo.TourTeamUnit = null; } //生成快速发布信息实体 tourTeamInfo.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo(); if (lineInfo.XingCheng != null) { //快速发布——行程内容 tourTeamInfo.TourQuickInfo.QuickPlan = lineInfo.XingCheng.QuotePlan; } //快速发布——备注 tourTeamInfo.TourQuickInfo.Remark = lineInfo.Remark; //快速发布——服务标准 tourTeamInfo.TourQuickInfo.Service = lineInfo.SpecialClaim; //销售员ID tourTeamInfo.SellerId = SiteUserInfo.ID; //我社报价 tourTeamInfo.TotalAmount = PriceControl1.TotalAmount; //团号 tourTeamInfo.TourCode = this.hid_tourCode.Value; //天数 tourTeamInfo.TourDays = Utils.GetInt(this.hid_dayCount.Value, 1); //计调员 tourTeamInfo.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); tourTeamInfo.Coordinator.CoordinatorId = Utils.GetInt(this.hid_peopleId.Value, 0); tourTeamInfo.Coordinator.Name = this.hid_peopleName.Value; //包含项目集合 tourTeamInfo.Services = this.PriceControl1.GetList; //区域路线编号 tourTeamInfo.AreaId = Utils.GetInt(this.hid_areaId.Value, 0); TheResult(lineQuoteBll.AddQuote(tourTeamInfo, lineInfo), "Submit"); }
/// <summary> /// 页面初始化方法 /// </summary> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour tourBll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo tourModel = tourBll.GetTourInfo(tourId); //声明bll对象 EyouSoft.BLL.CompanyStructure.CompanySetting bll = new EyouSoft.BLL.CompanyStructure.CompanySetting(); //声明保存打印URL 的集合 IList <PrintUrlModel> list = new List <PrintUrlModel>(); //声明临时对象 用来保存url 和显示文字 PrintUrlModel model = null; //判断该计划是团队计划 if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)tourModel; //团队计划打印名单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划打印名单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划打印名单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //行程单 if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { //团队计划快速发布行程单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划快速发布行程单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划快速发布行程单.ToString(); if (model.PrintUrl != "") { list.Add(model); } } else { //团队计划标准版发布行程单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划标准发布行程单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队计划标准发布行程单.ToString(); if (model.PrintUrl != "") { list.Add(model); } } //团队确认单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队确认单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.团队确认单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //报价单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.报价单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.报价单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //团队送团单 model = new PrintUrlModel(); if (teamModel.TicketStatus == EyouSoft.Model.EnumType.PlanStructure.TicketState.已出票) { model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单); } else { model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单); TicketStatus = true; } model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //原行程下载 model = new PrintUrlModel(); if (teamModel.Attachs != null && teamModel.Attachs.Count > 0) { model.PrintUrl = teamModel.Attachs[0].FilePath.ToString().Trim(); model.ShowText = "原行程下载"; } if (model.PrintUrl != null && model.PrintUrl != "") { list.Add(model); } } if (tourModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo teamModel = (EyouSoft.Model.TourStructure.TourInfo)tourModel; model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划打印名单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划打印名单.ToString(); if (model.PrintUrl != "") { list.Add(model); } if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划标准发布行程单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划标准发布行程单.ToString(); if (model.PrintUrl != "") { list.Add(model); } } if (teamModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划快速发布行程单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散拼计划快速发布行程单.ToString(); if (model.PrintUrl != "") { list.Add(model); } } //model = new PrintUrlModel(); //model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散客确认单); //model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.散客确认单.ToString(); //if (model.PrintUrl != "") // list.Add(model); //散拼送团单 model = new PrintUrlModel(); if (teamModel.TicketStatus == EyouSoft.Model.EnumType.PlanStructure.TicketState.已出票) { model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单); TicketStatus = true; } else { model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单); TicketStatus = true; } model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //原行程下载 model = new PrintUrlModel(); if (teamModel.Attachs != null && teamModel.Attachs.Count > 0) { model.PrintUrl = teamModel.Attachs[0].FilePath.ToString().Trim(); model.ShowText = "原行程下载"; } if (model.PrintUrl != null && model.PrintUrl != "") { list.Add(model); } } //结算通知单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.结算通知单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.结算通知单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //结算明细单 //model = new PrintUrlModel(); //model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.结算明细单); //model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.结算明细单.ToString(); //if (model.PrintUrl != "") //{ // list.Add(model); //} //地接确认单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.地接确认单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.地接确认单.ToString(); if (model.PrintUrl != "") { list.Add(model); } //送团任务单 model = new PrintUrlModel(); model.PrintUrl = bll.GetPrintPath(SiteUserInfo.CompanyID, EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团任务单); model.ShowText = EyouSoft.Model.EnumType.CompanyStructure.PrintTemplateType.送团任务单.ToString(); if (model.PrintUrl != "") { list.Add(model); } if (list != null && list.Count > 0) { this.rptUPrintUrl.DataSource = list; this.rptUPrintUrl.DataBind(); } }
/// <summary> /// 绑定数据 /// </summary> void BindXC() { tabxcquick.Visible = false; tabProject.Visible = false; tabProject20.Visible = false; //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明散拼计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(Utils.GetQueryStringValue("tourId")); if (model != null) { #region 标准,快速 公有数据 xcTime = model.LDate; lblGoTraffic.Text = model.LTraffic; lblEndTraffic.Text = model.RTraffic; lblTid.Text = model.TourCode; #endregion #region 组团社联系信息 this.lblSetMan.Text = model.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //组团 联系人电话 this.lblSetPhone.Text = cusModel.Phone; this.lblSetPhone2.Text = cusModel.Phone; //组团联系人Fax this.lblSetFAX.Text = cusModel.Fax; this.lblSetMan.Text = cusModel.Name; this.lblSetMan2.Text = cusModel.Name; this.lblSetName.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(model.OperatorId); if (userInfoModel != null) { ////主要联系人电话 //this.lblGetMan.Text = userInfoModel.ContactTel; ////专线FAX //this.lblGetFAX.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(model.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.lblGetPhone.Text = companyModel.ContactTel; this.lblGetPhone2.Text = companyModel.ContactTel; this.lblGetMan.Text = companyModel.CompanyName; this.lblGetMan2.Text = companyModel.CompanyName; this.lblGetName.Text = companyModel.ContactName; this.lblGetFAX.Text = companyModel.ContactFax; } } #endregion if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { #region 标准发布 if (model.TourNormalInfo != null) { this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourNormalInfo.Plans != null && model.TourNormalInfo.Plans.Count > 0) { xc_list.DataSource = model.TourNormalInfo.Plans; xc_list.DataBind(); } lblBuHanXiangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); lblZiFeiXIangMu.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); lblErTongAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); lblGouWuAnPai.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); lblZhuYiShiXiang.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); lblTotalAmount.Text = model.TotalAmount.ToString("#0.00") + "元"; lblGatheringPlace.Text = model.GatheringPlace; lblGatheringTime.Text = model.GatheringTime; if (model.Services != null && model.Services.Count > 0) { rpt_sList.DataSource = model.Services; rpt_sList.DataBind(); sListRowsCount = model.Services.Count; } tabProject.Visible = true; tabProject20.Visible = true; } #endregion } else { #region 快速发布 tabxcquick.Visible = true; this.lblLineName.Text = model.RouteName == "" ? "" : model.RouteName; this.lblDaySum.Text = model.TourDays.ToString() == "" ? "0" : model.TourDays.ToString(); this.lblGoTraffic.Text = model.LTraffic; this.lblEndTraffic.Text = model.RTraffic; this.lblManSum.Text = model.PlanPeopleNumber.ToString(); if (model.TourQuickInfo != null) { lblKs.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourQuickInfo.Remark); lblQuickPlan.Text = model.TourQuickInfo.QuickPlan; } #endregion } } else { Response.Clear(); Response.Write("未找到信息"); Response.End(); } }
/// <summary> /// 初始化数据 /// </summary> /// <param name="tourId"></param> protected 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; if (infoModel != null) { //线路名称 this.litRouteName.Text = infoModel.RouteName; this.litLdate.Text = infoModel.LDate.ToString("yyyy-MM-dd"); //专线主要联系人 this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName; this.litQuerenDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); } EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel(SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId")); if (customerList != null) { //组团社 buyCompanyName = customerList.BuyCompanyName; //组团社联系人 buyCompanyContentName = customerList.BuyerContactName; this.litbuyCompanyName.Text = customerList.BuyCompanyName; this.litPeopleCount.Text = customerList.PeopleNumber.ToString(); this.litCostDetail.Text = (customerList.AdultNumber) + "*" + (customerList.PersonalPrice.ToString("0.00")) + " + " + (customerList.ChildNumber) + " * " + (customerList.ChildPrice.ToString("0.00")); this.litCostSum.Text = customerList.SumPrice.ToString("0.00"); string vistors = string.Empty; if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { for (int i = 0; i < customerList.CustomerList.Count; i++) { vistors += customerList.CustomerList[i].VisitorName + ","; } } } this.litVistors.Text = vistors.TrimEnd(','); //备注 if (customerList.AmountPlus != null) { this.litremark.Text = customerList.AmountPlus.Remark; } } } else { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (teamModel != null) { //组团社 buyCompanyName = teamModel.BuyerCName; this.litbuyCompanyName.Text = teamModel.BuyerCName; //组团社联系人 EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(teamModel.BuyerCId); if (CustomerInfo != null) { if (CustomerInfo.CustomerContactList != null && CustomerInfo.CustomerContactList.Count > 0) { buyCompanyContentName = CustomerInfo.CustomerContactList[0].Name; } } this.litRouteName.Text = teamModel.RouteName; this.litLdate.Text = teamModel.LDate.ToString("yyyy-MM-dd"); //专线主要联系人 this.litContectName.Value = this.SiteUserInfo.ContactInfo.ContactName; this.litQuerenDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); } EyouSoft.Model.TourStructure.TourOrder customerList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderModel (SiteUserInfo.CompanyID, EyouSoft.Common.Utils.GetQueryStringValue("orderId")); if (customerList != null) { this.litPeopleCount.Text = customerList.PeopleNumber.ToString(); if (customerList.TourTeamUnit != null) { this.litCostDetail.Text = customerList.TourTeamUnit.UnitAmountCr.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountEt.ToString("0.00") + "+" + customerList.TourTeamUnit.UnitAmountQp.ToString("0.00"); } this.litCostSum.Text = customerList.SumPrice.ToString("0.00"); string vistors = string.Empty; if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { customerList.CustomerList = customerList.CustomerList.Where(p => p.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList(); if (customerList.CustomerList != null && customerList.CustomerList.Count > 0) { for (int i = 0; i < customerList.CustomerList.Count; i++) { vistors += customerList.CustomerList[i].VisitorName + ","; } } } this.litVistors.Text = vistors.TrimEnd(','); //备注 if (customerList.AmountPlus != null) { this.litremark.Text = customerList.AmountPlus.Remark; } } } //公司账户信息 EyouSoft.Model.CompanyStructure.CompanyInfo info = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(CurrentUserCompanyID, CurrentUserCompanyID); if (info != null) { if (info.CompanyAccountList != null && info.CompanyAccountList.Count > 0) { if (string.IsNullOrEmpty(info.CompanyAccountList[0].AccountName)) { this.trAccountNameView.Visible = false; } else { this.lithuming.Text = info.CompanyAccountList[0].AccountName; } if (string.IsNullOrEmpty(info.CompanyAccountList[0].BankName) && string.IsNullOrEmpty(info.CompanyAccountList[0].BankNo)) { this.trBankView.Visible = false; } else { this.litkaihuhang.Text = info.CompanyAccountList[0].BankName; this.litzhanghao.Text = info.CompanyAccountList[0].BankNo; } } else { this.trBankView.Visible = false; this.trAccountNameView.Visible = false; } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { #region 页面控件赋值 //线路名称 this.lblAreaName.Text = model.RouteName; //团号 this.lblTeamNum.Text = model.TourCode; //人数 #region 人数And结算价 if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); this.lblAdult.Text = number; } else { this.lblAdult.Text = model.PlanPeopleNumber.ToString(); } #endregion //出发交通 this.lblBegin.Text = model.LTraffic; //返程交通 this.lblEnd.Text = model.RTraffic; //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //儿童安排 this.lblChildPlan.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ErTongAnPai); //自费项目 this.lblSelfProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZiFeiXIangMu); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //温馨提示 this.lblTips.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.WenXinTiXing); //出团日期 LeaveDate = model.LDate; //行程安排 if (model.TourNormalInfo.Plans != null && model.TourNormalInfo.Plans.Count > 0) { rptTravelTDCount = model.TourNormalInfo.Plans.Count * 4; this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); } //包含项目 this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); //地接社信息 if (model.LocalAgencys != null && model.LocalAgencys.Count > 0) { rptDjInfoTDCount = model.LocalAgencys.Count; } this.rptDjInfo.DataSource = model.LocalAgencys; this.rptDjInfo.DataBind(); #endregion } }
/// <summary> /// 页面控件初始化 /// </summary> /// <param name="id"></param> protected void DataInit(string id) { //初始化时 获得Model EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo) new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo).GetTourInfo(id); if (model != null) { //如果该团队计划已经核算结束或提交财务,那么不提供修改功能 if (model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 || model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算) { this.pelAdd.Visible = false; } if (model.TourTraffic != null && model.TourTraffic.Count > 0) { strTraffic = GetTrafficList(model.TourTraffic.First()); } #region 页面控件赋值 //类型判断 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { Response.Redirect("/TeamPlan/FastVersion.aspx?type=" + this.hideType.Value + "&id=" + id); return; } //线路区域 DdlAreaInit(model.AreaId.ToString()); //计调员 GetSettleByArea(model.AreaId, model.Coordinator != null ? model.Coordinator.CoordinatorId.ToString() : ""); //团队编号 this.txtTeamNum.Text = model.TourCode; this.hideOldTeamNum.Value = model.TourCode; //线路ID this.xianluWindow1.Id = model.RouteId.ToString(); //线路名称 this.xianluWindow1.Name = model.RouteName; //天数 this.txtDayCount.Text = model.TourDays.ToString(); //人数 this.txtPeopelCount.Text = model.PlanPeopleNumber.ToString(); this.hid_PeopelCount.Value = model.PlanPeopleNumber.ToString(); //出发交通 this.txtStartTraffic.Text = model.LTraffic; //返程交通 this.txtEndTraffic.Text = model.RTraffic; //出团日期 this.txtLDate.Text = model.LDate.ToString("yyyy-MM-dd"); //地接社信息 this.DiJieControl1.SetList = model.LocalAgencys; //行程安排 this.xingcheng1.Bind(model.TourNormalInfo.Plans.ToList()); //包含项目 this.PriceControl1.SetList = model.Services; //设置合计价格 this.PriceControl1.TotalAmount = model.TotalAmount; //单价合计 //this.PriceControl1.OnePriceAll = model.SelfUnitPriceAmount; if (model.TourTeamUnit != null) { this.PriceControl1.all_price = model.TourTeamUnit.UnitAmountQp; this.PriceControl1.cr_price = model.TourTeamUnit.UnitAmountCr; this.PriceControl1.rt_price = model.TourTeamUnit.UnitAmountEt; txt_allNum.Text = model.TourTeamUnit.NumberQp.ToString(); txt_crNum.Text = model.TourTeamUnit.NumberCr.ToString(); txt_rtNum.Text = model.TourTeamUnit.NumberEt.ToString(); hid_Num.Value = (model.TourTeamUnit.NumberQp + model.TourTeamUnit.NumberCr + model.TourTeamUnit.NumberEt).ToString(); } //不含项目 this.txtNoProject.Text = model.TourNormalInfo.BuHanXiangMu; //购物安排 this.txtBuyPlan.Text = model.TourNormalInfo.GouWuAnPai; //儿童安排 this.txtChildPlan.Text = model.TourNormalInfo.ErTongAnPai; //自费项目 this.txtSelfProject.Text = model.TourNormalInfo.ZiFeiXIangMu; //注意事项 this.txtNote.Text = model.TourNormalInfo.ZhuYiShiXiang; //温馨提示 this.txtTips.Text = model.TourNormalInfo.WenXinTiXing; //内部信息 this.txtNeiBu.Text = model.TourNormalInfo.NeiBuXingXi; //组团社ID this.hideGroupsId.Value = model.BuyerCId.ToString(); //组团社名称 this.txtGroupsName.Text = model.BuyerCName; //集合地点 this.txtPlace.Text = model.GatheringPlace; //集合标志 this.txtLogo.Text = model.GatheringSign; //集合时间 //if (Utils.GetDateTimeNullable(model.GatheringTime) == null) //{ // this.txtGathered.Text = string.Empty; //} //else //{ // //日期 // string[] date = model.GatheringTime.Split(' '); // //时间 // if (date.Length > 1) // { // //日期部分赋值 // this.txtGathered.Text = date[0]; // //拆分时间部分 // string[] time = date[1].Split(':'); // if (time.Length > 0) // { // //取时间部分的时 // ddl_jh_date.SelectedValue = time[0]; // } // } // else // { // //日期部分赋值 // this.txtGathered.Text = date[0]; // } //} this.txtGathered.Text = model.GatheringTime; //常用城市 CityDataInit(model.TourCityId.ToString()); #region 添加送团人 //model.SentPeoples = new List<EyouSoft.Model.TourStructure.TourSentPeopleInfo>(); if (model.SentPeoples != null && model.SentPeoples.Count > 0) { for (int i = 0; i < model.SentPeoples.Count; i++) { this.selectOperator1.OperId += model.SentPeoples[i].OperatorId + ","; this.selectOperator1.OperName += model.SentPeoples[i].OperatorName + ","; } this.selectOperator1.OperName.TrimEnd(','); this.selectOperator1.OperId.TrimEnd(','); } #endregion //文件显示 IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = model.Attachs; if (attachList != null && attachList.Count > 0) { EyouSoft.Model.TourStructure.TourAttachInfo fileModel = attachList[0]; if (fileModel.FilePath.Trim() == "") { this.pnlFile.Visible = false; } else { this.hideData.Value = fileModel.FilePath; this.lblFileName.Text = "<a href=\"" + fileModel.FilePath + "\" target=\"_blank\">查看附件</a>"; } } else { this.pnlFile.Visible = false; } #endregion } else { //如果未找到则跳转至列表 Response.Redirect("/TeamPlan/TeamPlanList.aspx"); } }
/// <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 />"; } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null && model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; //收款单位 this.txtBuyerCName.Text = teamModel.BuyerCName; EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(model.BuyerCId); if (cusModel != null) { //收款人 txtContact.Text = cusModel.ContactName; //电话 txtPbone.Text = cusModel.Phone; //传真 txtFax.Text = cusModel.Fax; } //线路 this.txtAreaName.Text = teamModel.RouteName; //人数 this.txtCount.Text = teamModel.PlanPeopleNumber.ToString(); //日期 this.txtDataTime.Text = DateTime.Now.ToString("yyyy-MM-dd"); //价格组成 if (teamModel.Services != null && teamModel.Services.Count > 0) { this.servicesCount = teamModel.Services.Count; this.rptProject.DataSource = teamModel.Services; this.rptProject.DataBind(); } //收入 IList <EyouSoft.Model.TourStructure.OrderFinanceExpense> fristList = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetOrderList(SiteUserInfo.CompanyID, tourId); if (fristList != null && fristList.Count > 0) { allCount += fristList.Count; this.rptFrist.DataSource = fristList; this.rptFrist.DataBind(); } //其它收入 EyouSoft.Model.FinanceStructure.OtherCostQuery otherCostQueryModel = new EyouSoft.Model.FinanceStructure.OtherCostQuery(); otherCostQueryModel.TourId = tourId; IList <EyouSoft.Model.FinanceStructure.OtherIncomeInfo> secoundList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherIncomeList(otherCostQueryModel); if (secoundList != null && secoundList.Count > 0) { allCount += secoundList.Count; this.rptSecound.DataSource = secoundList; this.rptSecound.DataBind(); } //支出 IList <EyouSoft.Model.PlanStructure.PaymentList> thirdList = new EyouSoft.BLL.PlanStruture.TravelAgency().GetSettleList(tourId); if (thirdList != null && thirdList.Count > 0) { allCount += thirdList.Count; this.rptThird.DataSource = thirdList; this.rptThird.DataBind(); } //其它支出 IList <EyouSoft.Model.FinanceStructure.OtherOutInfo> forthList = new EyouSoft.BLL.FinanceStructure.OtherCost(SiteUserInfo).GetOtherOutList(otherCostQueryModel); if (forthList != null && forthList.Count > 0) { allCount += forthList.Count; this.rptForth.DataSource = forthList; this.rptForth.DataBind(); } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="travelId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo baseinfo = bll.GetTourInfo(tourId); //地接的操作BLL EyouSoft.BLL.PlanStruture.TravelAgency travelbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); //获得该计划下的所有地接的集合 IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> listAgency = travelbll.GetList(tourId); rpt_area.DataSource = listAgency; rpt_area.DataBind(); if (baseinfo != null) { this.lblTourCode.Text = baseinfo.TourCode; // this.lblContactName.Text = baseinfo. txtDate1.Text = baseinfo.PlanPeopleNumber.ToString(); DateTime Ldate = baseinfo.LDate; DateTime Edate = Ldate.AddDays(baseinfo.TourDays); txtDate0.Text = Ldate.ToString("MM月dd日") + "-" + Edate.ToString("MM月dd日"); if (baseinfo.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)baseinfo; if (model != null && model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { if (model.TourNormalInfo != null) { //行程安排 this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); //内部信息 this.txtRemarks.Text = model.TourNormalInfo.NeiBuXingXi; } } else { this.tr_Treval.Visible = false; trXc.Visible = true; if (model.TourQuickInfo != null) { lt_xc.Text = model.TourQuickInfo.QuickPlan; } } #region 页面控件赋值 //包含项目 this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); if (model.Services != null && model.Services.Count > 0) { string str = ""; decimal sum = 0; for (int i = 0; i < model.Services.Count; i++) { if ((i + 1) % 2 == 0) { str += "<tr><td bgcolor=\"#ffffff\" align=\"left\">" + (i + 1) + "、" + model.Services[i].ServiceType.ToString() + ":" + Utils.FilterEndOfTheZeroString(model.Services[i].LocalPrice.ToString("0.00")) + "</td>"; } else { str += "<td bgcolor=\"#ffffff\" align=\"left\">" + (i + 1) + "、" + model.Services[i].ServiceType.ToString() + ":" + Utils.FilterEndOfTheZeroString(model.Services[i].LocalPrice.ToString("0.00")) + "</td></tr>"; sum += model.Services[i].LocalPrice; } } if (model.Services.Count % 2 != 0) { str += "<td bgcolor=\"#ffffff\" align=\"left\"></td></tr>"; } this.litList.Text = str; txt_priceSum.Text = sum.ToString("0.00"); } //出团日期 LeaveDate = model.LDate; #endregion } else { //散拼计划 EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)baseinfo; //标准版 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.lblMoney.Text = ""; if (model.TourNormalInfo != null) { //行程安排 this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); //包含项目 this.rptProject.DataSource = model.TourNormalInfo.Services; this.rptProject.DataBind(); //内部信息 this.txtRemarks.Text = model.TourNormalInfo.NeiBuXingXi; } } else { //没有数据 不操作 this.lblMsg.Text = ""; this.tr_Treval.Visible = false; this.lblMoney.Text = ""; trXc.Visible = true; if (model.TourQuickInfo != null) { lt_xc.Text = model.TourQuickInfo.QuickPlan; } } LeaveDate = model.LDate; } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId">行程单ID</param> protected void DataInit(string tourId) { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(tourId); if (model != null) { #region 页面控件赋值 //出团日期 LeaveDate = model.LDate.ToString("yyyy-MM-dd"); //出发交通 lblBegin = model.LTraffic; //组团社 this.txtZutuanName.Text = model.BuyerCName; //联系信息 EyouSoft.BLL.CompanyStructure.CompanySupplier supplierBll = new EyouSoft.BLL.CompanyStructure.CompanySupplier(); EyouSoft.Model.CompanyStructure.CompanySupplier companyModel = supplierBll.GetModel(model.BuyerCId, SiteUserInfo.CompanyID); if (companyModel != null) { if (companyModel.SupplierContact != null && companyModel.SupplierContact.Count > 0) { this.txtIncomeMan.Text = companyModel.SupplierContact[0].ContactName; this.txtFax.Text = companyModel.SupplierContact[0].ContactFax; } } //集合时间 lblGatheredDate.Text = model.GatheringTime; //送团人 if (model.SentPeoples != null && model.SentPeoples.Count > 0) { this.txtOffName.Text = model.SentPeoples[0].OperatorName; } this.txtAddress.Text = model.GatheringPlace; //返程交通 lblEnd = model.RTraffic; if (model.TourNormalInfo != null) { //不含项目 this.lblNoProject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.BuHanXiangMu); //购物安排 this.lblBuy.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.GouWuAnPai); //注意事项 this.lblNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); //行程安排 if (model.TourNormalInfo.Plans != null) { this.listCount = model.TourNormalInfo.Plans.Count; tdCount = model.TourNormalInfo.Plans.Count; this.rptTravel.DataSource = model.TourNormalInfo.Plans; this.rptTravel.DataBind(); } } //人数 #region 人数And结算价 if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); this.lblAdult.Text = number; } else { this.lblAdult.Text = model.PlanPeopleNumber.ToString(); } #endregion //团队类型 this.txtTourType.Text = model.TourType.ToString(); //包含项目 this.rptProject.DataSource = model.Services; this.rptProject.DataBind(); #endregion } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (tModel != null) { //线路名称 this.litRouteName.Text = tModel.RouteName; EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (tModel.SentPeoples != null && tModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < tModel.SentPeoples.Count; i++) { strSongTuanName += tModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(tModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = tModel.LTraffic; //返程航班/时间 this.litRFilght.Text = tModel.RTraffic; //集合地点 this.litJihePlace.Text = tModel.GatheringPlace; if (tModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (tModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = tModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = tModel.TourNormalInfo.WenXinTiXing; //行程安排 if (tModel.TourNormalInfo.Plans != null && tModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < tModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (tModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + tModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); this.pneStand.Visible = false; if (tModel.TourQuickInfo != null) { this.litQplan.Text = tModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = tModel.TourQuickInfo.Service; } } } } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; if (ttModel != null) { //线路名称 this.litRouteName.Text = ttModel.RouteName; //组团社 this.litBuyCompanyName.Text = ttModel.BuyerCName; //组团社联系人 EyouSoft.Model.CompanyStructure.CustomerInfo CustomerInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(ttModel.BuyerCId); if (CustomerInfo != null) { this.litCustomName.Text = CustomerInfo.ContactName; this.litTel.Text = CustomerInfo.Phone; this.litFax.Text = CustomerInfo.Fax; } EyouSoft.Model.TourStructure.TourOrder order = new EyouSoft.BLL.TourStructure.TourOrder().GetOrderModel(CurrentUserCompanyID, Utils.GetQueryStringValue("orderId")); if (order != null) { //组团社 this.litBuyCompanyName.Text = order.BuyCompanyName; //组团社联系人 this.litCustomName.Text = order.ContactName; this.litTel.Text = order.ContactTel; this.litFax.Text = order.ContactFax; //游客信息 string strVistors = string.Empty; if (order.CustomerList != null && order.CustomerList.Count > 0) { for (int i = 0; i < order.CustomerList.Count; i++) { strVistors += order.CustomerList[i].VisitorName + ","; } this.litVisitorsList.Text = strVistors.TrimEnd(','); } } //机场送团 if (ttModel.SentPeoples != null && ttModel.SentPeoples.Count > 0) { string strSongTuanName = string.Empty; for (int i = 0; i < ttModel.SentPeoples.Count; i++) { strSongTuanName += ttModel.SentPeoples[i].OperatorName + ","; } this.litSongTuanName.Text = strSongTuanName.TrimEnd(','); //手机 EyouSoft.Model.CompanyStructure.CompanyUser userModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserInfo(ttModel.SentPeoples[0].OperatorId); if (userModel != null) { this.litSongTuanPhone.Text = userModel.PersonInfo.ContactMobile; } } //去程航班/时间 this.litLFilght.Text = ttModel.LTraffic; //返程航班/时间 this.litRFilght.Text = ttModel.RTraffic; //集合地点 this.litJihePlace.Text = ttModel.GatheringPlace; if (ttModel.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { this.litQplan.Visible = false; this.pnequick.Visible = false; if (ttModel.TourNormalInfo != null) { //注意事项 this.litZhuYiShiXiang.Text = ttModel.TourNormalInfo.ZhuYiShiXiang; //温馨提醒 this.litWenXinTiXing.Text = ttModel.TourNormalInfo.WenXinTiXing; //行程安排 if (ttModel.TourNormalInfo.Plans != null && ttModel.TourNormalInfo.Plans.Count > 0) { for (int i = 0; i < ttModel.TourNormalInfo.Plans.Count; i++) { TravelplanStr += "<tr><td height=\"25\" align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.LDate.AddDays(i).ToString("yyyy-MM-dd") + "</td><td align=\"left\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Plan + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("2") ? "早," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("3") ? "中," : "") + "" + (ttModel.TourNormalInfo.Plans[i].Dinner.Contains("4") ? "晚," : "") + "</td><td align=\"center\" bgcolor=\"#FFFFFF\">" + ttModel.TourNormalInfo.Plans[i].Hotel + "</td></tr>"; } } } } else { this.pnetab.Visible = false; this.pneStand.Visible = false; this.tabView.Attributes.Add("style", "border: 1px #000000 solid"); if (ttModel.TourQuickInfo != null) { this.litQplan.Text = ttModel.TourQuickInfo.QuickPlan; this.litServerStand.Text = ttModel.TourQuickInfo.Service; } } } } } }
/// <summary> /// 页面控件赋值 /// </summary> /// <param name="id">计划ID</param> protected void DataInit(string id) { //获得团队计划model EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo) new EyouSoft.BLL.TourStructure.Tour().GetTourInfo(id); if (model != null) { //如果该团队计划已经核算结束或提交财务,那么不提供修改功能 if (model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 || model.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算) { this.pelAdd.Visible = false; } if (model.TourTraffic != null && model.TourTraffic.Count > 0) { strTraffic = GetTrafficList(model.TourTraffic.First()); } #region 页面控件赋值 //类型判断 if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { Response.Redirect("/TeamPlan/StandardVersion.aspx?type=" + this.hideType.Value + "&id=" + id); return; } //线路区域 DdlAreaInit(model.AreaId.ToString()); //计调员 GetSettleByArea(model.AreaId, model.Coordinator != null ? model.Coordinator.CoordinatorId.ToString() : ""); //团队编号 this.txtTeamNum.Text = model.TourCode; this.hideOldTeamNum.Value = model.TourCode; //线路ID this.xianluWindow1.Id = model.RouteId.ToString(); //线路名称 this.xianluWindow1.Name = model.RouteName; //天数 this.txtDayCount.Text = model.TourDays.ToString(); //人数 this.txtPeopelCount.Text = model.PlanPeopleNumber.ToString(); this.hid_PeopelCount.Value = model.PlanPeopleNumber.ToString(); //出发交通 this.txtStartTraffic.Text = model.LTraffic; //返程交通 this.txtEndTraffic.Text = model.RTraffic; //出团日期 this.txtLDate.Text = model.LDate.ToString("yyyy-MM-dd"); //回团日期 //this.txtRDate.Text = model.RDate.ToString("yyyy-MM-dd"); //地接社信息 this.DiJieControl1.SetList = model.LocalAgencys; //价格组成 this.PriceControl1.SetList = model.Services; //设置合计价格 this.PriceControl1.TotalAmount = model.TotalAmount; if (model.TourTeamUnit != null) { this.PriceControl1.all_price = model.TourTeamUnit.UnitAmountQp; this.PriceControl1.cr_price = model.TourTeamUnit.UnitAmountCr; this.PriceControl1.rt_price = model.TourTeamUnit.UnitAmountEt; txt_allNum.Text = model.TourTeamUnit.NumberQp.ToString(); txt_crNum.Text = model.TourTeamUnit.NumberCr.ToString(); txt_rtNum.Text = model.TourTeamUnit.NumberEt.ToString(); hid_Num.Value = (model.TourTeamUnit.NumberQp + model.TourTeamUnit.NumberCr + model.TourTeamUnit.NumberEt).ToString(); } if (model.TourQuickInfo != null) { //行程安排 this.txtTravel.Text = model.TourQuickInfo.QuickPlan; //服务标准 this.txtServices.Text = model.TourQuickInfo.Service; //备注 this.txtRemarks.Text = model.TourQuickInfo.Remark; } //组团社ID this.hideGroupsId.Value = model.BuyerCId.ToString(); //组团社名称 this.txtGroupsName.Text = model.BuyerCName; //常用城市 CityDataInit(model.TourCityId.ToString()); //文件 IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = model.Attachs; if (attachList != null && attachList.Count > 0) { EyouSoft.Model.TourStructure.TourAttachInfo fileModel = attachList[0]; if (fileModel != null) { if (fileModel.FilePath.Trim() == "") { this.pnlFile.Visible = false; } else { this.lblFileName.Text = "<a href=\"" + fileModel.FilePath + "\" target=\"_blank\">查看附件</a>"; this.hideData.Value = fileModel.FilePath; } } } else { this.pnlFile.Visible = false; } #endregion } }
protected void LinkButton2_Click(object sender, EventArgs e) { BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); ModelRouteTeaminfo = new EyouSoft.Model.RouteStructure.QuoteTeamInfo(); #region 提交报价信息 SetQuoteTeamValues(); #endregion #region 报价写入团队计划 EyouSoft.BLL.TourStructure.Tour Tour = new EyouSoft.BLL.TourStructure.Tour(); EyouSoft.Model.TourStructure.TourTeamInfo TourInfo = new EyouSoft.Model.TourStructure.TourTeamInfo(); //计调员信息实体 TourInfo.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); //计调员编号 TourInfo.Coordinator.CoordinatorId = Utils.GetInt(Request.Form[ddl_Oprator.UniqueID]); //预计出团时间 if (Utils.GetDateTimeNullable(Utils.GetFormValue(this.Txt_GroupStarTime.UniqueID)) == null) { SetErrorMsg(false, "请填写预计出团时间!"); return; } TourInfo.LDate = Convert.ToDateTime(Utils.GetString(Utils.GetFormValue(this.Txt_GroupStarTime.UniqueID), "")); //人数 if (Utils.GetInt(Utils.GetFormValue(this.Txt_Numbers.UniqueID.Trim())) <= 0) { SetErrorMsg(false, "请填写大于0的整数!"); return; } else { TourInfo.PlanPeopleNumber = Utils.GetInt(Utils.GetFormValue(this.Txt_Numbers.UniqueID.Trim())); } //我社报价总金额 TourInfo.TotalAmount = this.PriceControl1.TotalAmount; //报价发布时间 TourInfo.CreateTime = System.DateTime.Now; if (new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(SiteUserInfo.CompanyID) == EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { TourInfo.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo() { NumberCr = TourInfo.PlanPeopleNumber, NumberEt = 0, NumberQp = 0, UnitAmountCr = 0, UnitAmountEt = 0, UnitAmountQp = 0 }; } else { TourInfo.TourTeamUnit = null; } TourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.团队计划; int RouteID = Utils.GetInt(Request.QueryString["RouteId"]); var routeinfo = new EyouSoft.BLL.RouteStructure.Route().GetRouteInfo(RouteID); if (routeinfo != null) { TourInfo.ReleaseType = routeinfo.ReleaseType; TourInfo.AreaId = routeinfo.AreaId; TourInfo.RouteName = routeinfo.RouteName; TourInfo.CompanyId = SiteUserInfo.CompanyID; TourInfo.OperatorId = SiteUserInfo.ID; TourInfo.SellerId = SiteUserInfo.ID; TourInfo.RouteId = RouteID; TourInfo.BuyerCId = Utils.GetInt(Utils.GetFormValue(this.hidCustId.UniqueID)); TourInfo.BuyerCName = Utils.GetFormValue(this.Txt_Inquiry.UniqueID); //线路天数 TourInfo.TourDays = routeinfo.RouteDays; //团号 TourInfo.TourCode = TourCode.Value; //价格组成 TourInfo.Services = this.PriceControl1.GetList; if (TourInfo.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick) { TourInfo.TourQuickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo() { Remark = routeinfo.RouteQuickInfo.Remark, QuickPlan = routeinfo.RouteQuickInfo.QuickPlan, Service = routeinfo.RouteQuickInfo.Service }; } else { TourInfo.TourNormalInfo = new EyouSoft.Model.TourStructure.TourTeamNormalPrivateInfo(); TourInfo.TourNormalInfo.Plans = routeinfo.RouteNormalInfo.Plans; TourInfo.TourNormalInfo.BuHanXiangMu = routeinfo.RouteNormalInfo.BuHanXiangMu; TourInfo.TourNormalInfo.ErTongAnPai = routeinfo.RouteNormalInfo.ErTongAnPai; TourInfo.TourNormalInfo.GouWuAnPai = routeinfo.RouteNormalInfo.GouWuAnPai; TourInfo.TourNormalInfo.NeiBuXingXi = routeinfo.RouteNormalInfo.NeiBuXingXi; TourInfo.TourNormalInfo.Plans = routeinfo.RouteNormalInfo.Plans; TourInfo.TourNormalInfo.WenXinTiXing = routeinfo.RouteNormalInfo.WenXinTiXing; TourInfo.TourNormalInfo.ZhuYiShiXiang = routeinfo.RouteNormalInfo.ZhuYiShiXiang; TourInfo.TourNormalInfo.ZiFeiXIangMu = routeinfo.RouteNormalInfo.ZiFeiXIangMu; } } if (Utils.GetFormValue(this.hideType.UniqueID) == "update") { //报价编号 ModelRouteTeaminfo.QuoteId = Utils.GetInt(Utils.GetQueryStringValue("QuoteID")); int QuoteID = BllQuote.UpdateTourTeamQuote(ModelRouteTeaminfo); if (QuoteID > 0) { TourInfo.QuoteId = QuoteID; if (Tour.InsertTeamTourInfo(TourInfo) > 0) { Utils.ShowAndRedirect("报价信息提交成功!", "/xianlu/Quote.aspx?RouteID=" + Utils.GetQueryStringValue("RouteId") + "&Areaid=" + Utils.GetQueryStringValue("Areaid")); } } else { Utils.ShowAndRedirect("报价信息提交失败!", "/xianlu/Quote.aspx?RouteID=" + Utils.GetQueryStringValue("RouteId") + "&Areaid=" + Utils.GetQueryStringValue("Areaid")); } } else { int QuoteId = BllQuote.InsertTourTeamQuote(ModelRouteTeaminfo); if (QuoteId > 0) { TourInfo.QuoteId = QuoteId; int insertTourResult = Tour.InsertTeamTourInfo(TourInfo); if (insertTourResult > 0) { //提示报价完成操作成功 Utils.ShowAndRedirect("报价完成操作成功!", "/xianlu/Quote.aspx?areaid=" + Utils.GetQueryStringValue("areaid") + "&RouteID=" + Utils.GetQueryStringValue("RouteId")); } } else { //提示报价完成操作失败 Utils.ShowAndRedirect("报价完成操作失败!", "/xianlu/Quote.aspx?areaid=" + Utils.GetQueryStringValue("areaid") + "&RouteID=" + Utils.GetQueryStringValue("RouteId")); } } #endregion }
void Bind() { //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); string tourId = Utils.GetQueryStringValue("tourId"); if (tourId == "") { Response.Write("未找到信息!"); return; } //声明团队计划对象 EyouSoft.Model.TourStructure.TourBaseInfo basemodel = bll.GetTourInfo(tourId); LeaveDate = basemodel.LDate; lt_LDate.Text = basemodel.LDate.Month.ToString() + "月" + basemodel.LDate.Day.ToString() + "日" + basemodel.TourType.ToString(); lt_TourName.Text = basemodel.RouteName; #region 组团端 EyouSoft.Model.CompanyStructure.CustomerInfo cusModel = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerModel(basemodel.BuyerCId); if (cusModel != null) { txt_to_fax.Text = cusModel.Fax; txt_to_name.Text = cusModel.Name; txt_to_tel.Text = cusModel.Phone; txt_to_user.Text = cusModel.ContactName; } #endregion #region 专线 EyouSoft.Model.CompanyStructure.ContactPersonInfo userInfoModel = new EyouSoft.BLL.CompanyStructure.CompanyUser().GetUserBasicInfo(basemodel.OperatorId); if (userInfoModel != null) { //主要联系人电话 this.txt_fr_tel.Text = userInfoModel.ContactTel; //专线FAX this.txt_fr_fax.Text = userInfoModel.ContactFax; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = new EyouSoft.BLL.CompanyStructure.CompanyInfo().GetModel(basemodel.CompanyId, SiteUserInfo.SysId); if (companyModel != null) { this.txt_fr_user.Text = companyModel.ContactName; txt_fr_name.Text = companyModel.CompanyName; txt_fr_tel.Text = companyModel.ContactTel; txt_fr_tel.Text = companyModel.ContactFax; } } #endregion if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo model = (EyouSoft.Model.TourStructure.TourInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.TourNormalInfo.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } else { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo model = (EyouSoft.Model.TourStructure.TourTeamInfo)basemodel; if (model.ReleaseType == EyouSoft.Model.EnumType.TourStructure.ReleaseType.Normal) { tb_normal.Visible = true; if (model.TourNormalInfo != null) { rptTravel.DataSource = model.TourNormalInfo.Plans; rptTravel.DataBind(); rptProject.DataSource = model.Services; rptProject.DataBind(); div_noproject.Visible = true; lblNoProject.Text = TextToHtml(model.TourNormalInfo.BuHanXiangMu); div_notice.Visible = true; lt_notice.Text = TextToHtml(model.TourNormalInfo.ZhuYiShiXiang); } } else { if (model.TourQuickInfo != null) { tb_normal.Visible = false; tb_quick.Visible = true; tb_quickService.Visible = true; lb_Quick.Text = model.TourQuickInfo.QuickPlan; lt_service.Text = model.TourQuickInfo.Service; } } /*#region 结算价 * TourQuotePrint priantTQP = new TourQuotePrint(); * string number = string.Empty; * string money = string.Empty; * priantTQP.getPepoleNum(SiteUserInfo.CompanyID,model.PlanPeopleNumber, model.TourTeamUnit, ref number, ref money); * this.txt_Money.Text = money; #endregion*/ } else if (basemodel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { p_title.Visible = false; d_title.Visible = false; Title = "单项服务确认单"; tb_single.Visible = true; tb_normal.Visible = false; EyouSoft.Model.TourStructure.TourSingleInfo model = (EyouSoft.Model.TourStructure.TourSingleInfo)basemodel; rpt_single.DataSource = model.Plans; rpt_single.DataBind(); txt_Money.Text = model.TotalAmount.ToString("#,##0.00"); } if (basemodel.TourType != EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { phJieSuanJiaGe.Visible = true; EyouSoft.BLL.PlanStruture.TravelAgency planbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> agencys = planbll.GetList(tourId); planbll = null; if (agencys != null && agencys.Count > 0) { System.Text.StringBuilder s = new System.Text.StringBuilder(); foreach (var agency in agencys) { s.AppendFormat("单位名称:{0} 结算费用:{1} ", agency.LocalTravelAgency, Utils.FilterEndOfTheZeroDecimal(agency.Settlement)); } txt_Money.Text = s.ToString(); } } }
/// <summary> /// 保存事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnSubmit_Click(object sender, EventArgs e) { NumConfig = (int)(new EyouSoft.BLL.CompanyStructure.CompanySetting().GetTeamNumberOfPeople(CurrentUserCompanyID)); #region 将表单值 赋值给变量 //团号 string teamNum = Utils.InputText(this.txtTeamNum.Text); //线路区域名 string lineArea = Utils.GetFormValue(this.ddlLineArea.UniqueID); //计调员 string coordinatorId = Utils.GetFormValue(this.ddlSeller.UniqueID); //组团社ID int buyerCId = Utils.GetInt(this.hideGroupsId.Value); //组团社名称 string buyerCName = Utils.GetFormValue(this.txtGroupsName.UniqueID); //线路名称 string xianLuName = this.xianluWindow1.Name; //线路ID string routeId = this.xianluWindow1.Id; //天数 int dayCount = Utils.GetInt(this.txtDayCount.Text); //人数 int peopleCount = Utils.GetInt(this.txtPeopelCount.Text); //出发交通 string startTraffic = Utils.InputText(this.txtStartTraffic.Text); //返程交通 string endTraffic = Utils.InputText(this.txtEndTraffic.Text.Trim()); //出团日期 DateTime lDate = Convert.ToDateTime(this.txtLDate.Text); //回团日期 // DateTime rDate = Convert.ToDateTime(this.txtRDate.Text); //添加地接社信息 IList <EyouSoft.Model.TourStructure.TourLocalAgencyInfo> list = this.DiJieControl1.GetList; //添加价格组成 IList <EyouSoft.Model.TourStructure.TourTeamServiceInfo> listPrice = this.PriceControl1.GetList; //行程安排 string travel = Utils.EditInputText(this.txtTravel.Text); //服务标准 string services = Utils.EditInputText(this.txtServices.Text); //备注 string remarks = this.txtRemarks.Text; //常用城市 int tourCity = Utils.GetInt(Utils.GetFormValue(this.ddlCityList.UniqueID)); #endregion #region 验证 //判断线路区域不能为空 if (lineArea == "") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择线路区域")); return; } //判断是否选择组团社 if (buyerCId <= 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择组团社!")); return; } if (coordinatorId == "-1") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请选择计调员!")); return; } //判断线路名称不能为空 if (xianLuName == "") { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入线路名称!")); return; } //判断天数不能为空 if (dayCount == 0) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入天数!")); return; } //判断人数不能为空 if ((peopleCount == null || peopleCount == 0) && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.OnlyTotalNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } int crNum = Utils.GetInt(txt_crNum.Text); if (crNum == 0 && NumConfig == (int)EyouSoft.Model.EnumType.CompanyStructure.TeamNumberOfPeople.PartNumber) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("请输入人数!")); return; } #endregion #region 验证上传文件的格式是否正确 string msg = ""; if (!EyouSoft.Common.Function.UploadFile.CheckFileType(Request.Files, "fileField", new[] { ".gif", ".jpeg", ".jpg", ".png", ".xls", ".doc", ".docx", ".rar", ".txt" }, null, out msg)) { this.litMsg.Text = Utils.ShowMsg(msg); return; } #endregion //声明bll对象 EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(); //声明团队计划对象 EyouSoft.Model.TourStructure.TourTeamInfo model = new EyouSoft.Model.TourStructure.TourTeamInfo(); if (this.hideType.Value == "Update") { //如果是修改操作,那么先获的这个对象 model = (EyouSoft.Model.TourStructure.TourTeamInfo)bll.GetTourInfo(this.hideID.Value); } #region 对象属性赋值 //判断对象时候存在 if (model != null) { //对象属性赋值 model.TourCode = teamNum; model.AreaId = Convert.ToInt32(lineArea); model.Coordinator = new EyouSoft.Model.TourStructure.TourCoordinatorInfo(); model.Coordinator.CoordinatorId = Utils.GetInt(coordinatorId); //修改时原购买单位 if (model.BuyerCId > 0) { model.OBuyerCId = model.BuyerCId; } model.BuyerCId = buyerCId; model.BuyerCName = buyerCName; model.RouteName = xianLuName; if (model.RouteId > 0) { model.ORouteId = model.RouteId; } model.RouteId = Utils.GetInt(routeId); model.TourDays = dayCount; model.PlanPeopleNumber = peopleCount; model.LTraffic = startTraffic; model.RTraffic = endTraffic; model.LDate = lDate; model.LocalAgencys = list; model.Services = listPrice; model.CompanyId = SiteUserInfo.CompanyID; EyouSoft.Model.TourStructure.TourQuickPrivateInfo quickInfo = new EyouSoft.Model.TourStructure.TourQuickPrivateInfo(); quickInfo.QuickPlan = travel; quickInfo.Service = services; quickInfo.Remark = remarks; model.TourQuickInfo = quickInfo; model.OperatorId = SiteUserInfo.ID; model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.团队计划; model.ReleaseType = EyouSoft.Model.EnumType.TourStructure.ReleaseType.Quick; model.TicketStatus = EyouSoft.Model.EnumType.PlanStructure.TicketState.None; model.TotalAmount = PriceControl1.TotalAmount; model.TourCityId = tourCity; model.TourTraffic = new List <int>() { Utils.GetInt(Utils.GetFormValue("selectTraffic"), -1) }; ///人数、单价 by txb model.TourTeamUnit = new EyouSoft.Model.TourStructure.MTourTeamUnitInfo(); model.TourTeamUnit.NumberCr = Utils.GetInt(txt_crNum.Text); model.TourTeamUnit.NumberEt = Utils.GetInt(txt_rtNum.Text); model.TourTeamUnit.NumberQp = Utils.GetInt(txt_allNum.Text); model.TourTeamUnit.UnitAmountCr = PriceControl1.cr_price; model.TourTeamUnit.UnitAmountEt = PriceControl1.rt_price; model.TourTeamUnit.UnitAmountQp = PriceControl1.all_price; #endregion #region 单文件 //团队附件实体 EyouSoft.Model.TourStructure.TourAttachInfo attachModel = new EyouSoft.Model.TourStructure.TourAttachInfo(); //文件路径 string filePath = ""; //文件名 string fileName = ""; //文件上传 if (EyouSoft.Common.Function.UploadFile.FileUpLoad(Request.Files["fileField"], "TeamPlanFile", out filePath, out fileName)) { if (filePath.Trim() != "" && fileName.Trim() != "") { //设置文件上传后的虚拟路劲 attachModel.FilePath = filePath; //保存原文件名 attachModel.Name = fileName; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else if (Utils.GetFormValue(this.hideData.UniqueID).Trim() != "") { attachModel.FilePath = this.hideData.Value; IList <EyouSoft.Model.TourStructure.TourAttachInfo> attachList = new List <EyouSoft.Model.TourStructure.TourAttachInfo>(); attachList.Add(attachModel); model.Attachs = attachList; } else { model.Attachs = null; } } else { //上传失败提示 this.litMsg.Text = Utils.ShowMsg("文件上传失败!"); return; } #endregion int count = 0; if (model.TourTraffic != null && model.TourTraffic.Count > 0) { EyouSoft.BLL.PlanStruture.PlanTrffic BLL = new EyouSoft.BLL.PlanStruture.PlanTrffic(); EyouSoft.Model.PlanStructure.TrafficPricesInfo TrafficPricesInfoModel = BLL.GetTrafficPriceModel(model.TourTraffic.First(), model.LDate); if (TrafficPricesInfoModel != null && TrafficPricesInfoModel.TicketNums > 0) { //如果是新增和复制 时 都做新增操作 if (this.hideType.Value == "Add" || this.hideType.Value == "Copy") { //数据库添加操作 count = bll.InsertTeamTourInfo(model); //新增成功 if (count > 0) { Utils.ShowAndRedirect("添加成功!", "/TeamPlan/TeamPlanList.aspx"); } else //失败时提示 if (count == -1) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("团号重复!")); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("添加失败!")); } } else { //数据库修改操作 count = bll.UpdateTeamTourInfo(model); //成功提示 if (count > 0) { Utils.ShowAndRedirect("修改成功!", "/TeamPlan/TeamPlanList.aspx"); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, Utils.ShowMsg("修改失败!")); } } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通票数为零!');location.href=location.href;</script>"); } } else { Response.Write("<script type='text/javascript'>alert('提交失败,关联交通为空!');location.href=location.href;</script>"); } } else { Utils.ShowAndRedirect("该计划不存在!", "/TeamPlan/TeamPlanList.aspx"); } }
/// <summary> /// 地接列表数据绑定 /// </summary> /// <param name="travelId">计划的ID</param> /// <param name="planType"></param> protected void DataListInit(string tourId) { if (tourId != "") { //地接的操作BLL EyouSoft.BLL.PlanStruture.TravelAgency travelbll = new EyouSoft.BLL.PlanStruture.TravelAgency(); //获得该计划下的所有地接的集合 IList <EyouSoft.Model.PlanStructure.LocalTravelAgencyInfo> list = travelbll.GetList(tourId); if (list != null && list.Count > 0) { //列表绑定数据 this.rptList.DataSource = list; this.rptList.DataBind(); BindPage(); } else { this.ExportPageInfo1.Visible = false; this.lblMsg.Text = "没有相关数据!"; } EyouSoft.Model.TourStructure.TourBaseInfo baseModel = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo).GetTourInfo(tourId); EyouSoft.Model.TourStructure.TourTeamInfo teamModel = null; EyouSoft.Model.TourStructure.TourInfo infoModel = null; if (baseModel != null) { if (baseModel.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.核算结束 || baseModel.Status == EyouSoft.Model.EnumType.TourStructure.TourStatus.财务核算) { this.pnlEdit.Visible = false; this.hideIsEidt.Value = "No"; } } if (baseModel.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { infoModel = (EyouSoft.Model.TourStructure.TourInfo)baseModel; } else { teamModel = (EyouSoft.Model.TourStructure.TourTeamInfo)baseModel; } if (infoModel != null) { this.txtBeginTime.Text = infoModel.LDate.ToString("yyyy-MM-dd"); this.txtEndTime.Text = infoModel.RDate.ToString("yyyy-MM-dd"); if (infoModel.TourNormalInfo != null && infoModel.TourNormalInfo.Plans != null) { IList <Jiedai> jiedaiList = new List <Jiedai>(); DateTime fristDate = infoModel.LDate; for (int j = 0; j < infoModel.TourNormalInfo.Plans.Count; j++) { Jiedai jModel = new Jiedai(); jModel.TraveDate = fristDate.AddDays(j).ToString("yyyy-MM-dd"); jModel.PlanContent = infoModel.TourNormalInfo.Plans[j].Plan; jiedaiList.Add(jModel); } this.rptJieDai.DataSource = jiedaiList; this.rptJieDai.DataBind(); } } if (teamModel != null) { this.txtBeginTime.Text = teamModel.LDate.ToString("yyyy-MM-dd"); this.txtEndTime.Text = teamModel.RDate.ToString("yyyy-MM-dd"); if (teamModel.TourNormalInfo != null && teamModel.TourNormalInfo.Plans != null) { IList <Jiedai> jiedaiList = new List <Jiedai>(); DateTime fristDate = teamModel.LDate; for (int j = 0; j < teamModel.TourNormalInfo.Plans.Count; j++) { Jiedai jModel = new Jiedai(); jModel.TraveDate = fristDate.AddDays(j).ToString("yyyy-MM-dd"); jModel.PlanContent = teamModel.TourNormalInfo.Plans[j].Plan; jiedaiList.Add(jModel); } this.rptJieDai.DataSource = jiedaiList; this.rptJieDai.DataBind(); } } } }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> protected void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); if (model != null) { this.hideTourID.Value = tourId; //绑定地接社信息 this.rptDjList.DataSource = bll.GetTourLocalAgencys(tourId); this.rptDjList.DataBind(); //绑定旅客信息 this.rptCustomer.DataSource = new EyouSoft.BLL.TourStructure.TourOrder(SiteUserInfo).GetTravellers(tourId).Where(x => x.CustomerStatus == EyouSoft.Model.EnumType.TourStructure.CustomerStatus.正常).ToList();; this.rptCustomer.DataBind(); //出团日期 this.txtOutDate.Text = model.LDate.ToString("yyyy-MM-dd"); //出发交通 this.lblBenginDate.Text = model.LTraffic; //回程交通 this.lblBackDate.Text = model.RTraffic; //线路名称 this.lblAreaName.Text = model.RouteName; //人数 this.lblCount.Text = model.PlanPeopleNumber.ToString(); //计划类型 this.lblTourType.Text = model.TourType.ToString(); if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { EyouSoft.Model.TourStructure.TourSingleInfo tsModel = (EyouSoft.Model.TourStructure.TourSingleInfo)model; //this.lblRemarks.Text =tsModel. } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.Model.TourStructure.TourInfo tModel = (EyouSoft.Model.TourStructure.TourInfo)model; if (tModel.TourNormalInfo != null) { //内部信息 this.lblRemarks.Text = tModel.TourNormalInfo.NeiBuXingXi; } //标志 this.txtNum4.Value = tModel.GatheringSign; //string gather = Utils.GetDateTimeNullable(tModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(tModel.GatheringTime).ToString(); //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点"); this.txtGather.Text = tModel.GatheringTime; IList <string> txtList = bll.GetTourGuides(tourId); if (txtList != null) { if (txtList.Count > 0) { this.txtNum1.Value = txtList[0]; } if (txtList.Count > 1) { this.txtNum2.Value = txtList[1]; } if (txtList.Count > 2) { this.txtNum3.Value = txtList[2]; } } } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { EyouSoft.Model.TourStructure.TourTeamInfo ttModel = (EyouSoft.Model.TourStructure.TourTeamInfo)model; #region 人数And结算价 TourQuotePrint priantTQP = new TourQuotePrint(); string number = string.Empty; string money = string.Empty; priantTQP.getPepoleNum(SiteUserInfo.CompanyID, model.PlanPeopleNumber, ttModel.TourTeamUnit, ref number, ref money); this.lblCount.Text = number; #endregion //内部信息 if (ttModel.TourNormalInfo != null) { this.lblRemarks.Text = ttModel.TourNormalInfo.NeiBuXingXi; } //标志 this.txtNum4.Value = ttModel.GatheringSign; //string gather = Utils.GetDateTimeNullable(ttModel.GatheringTime) == null ? string.Empty : Utils.GetDateTimeNullable(ttModel.GatheringTime).ToString(); //this.txtGather.Text = gather == string.Empty ? "" : (Utils.GetDateTime(gather, DateTime.Now)).ToString("yyyy-MM-dd hh 点"); this.txtGather.Text = ttModel.GatheringTime; IList <string> txtList = bll.GetTourGuides(tourId); if (txtList != null) { if (txtList.Count > 0) { this.txtNum1.Value = txtList[0]; } if (txtList.Count > 1) { this.txtNum2.Value = txtList[1]; } if (txtList.Count > 2) { this.txtNum3.Value = txtList[2]; } } } } }