protected void LinkButton1_Click(object sender, EventArgs e) { BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); ModelRouteTeaminfo = new EyouSoft.Model.RouteStructure.QuoteTeamInfo(); if (SetQuoteTeamValues()) { string ActionType = Utils.GetFormValue(this.hideType.UniqueID); if (ActionType == "update") { ModelRouteTeaminfo.QuoteId = Utils.GetInt(Utils.GetQueryStringValue("QuoteID")); if (BllQuote.UpdateTourTeamQuote(ModelRouteTeaminfo) > 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 { //提交报价信息 if (BllQuote.InsertTourTeamQuote(ModelRouteTeaminfo) > 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")); } } } }
protected void InitBindQuoteList() { BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); int RouteID = Utils.GetInt(EyouSoft.Common.Utils.GetQueryStringValue("RouteId")); if (RouteID > 0) { this.Ctp_QuoteList.DataSource = BllQuote.GetQuotesTeam(SiteUserInfo.ID, RouteID, PageSize, PageIndex, ref RecordCount); this.Ctp_QuoteList.DataBind(); } BllQuote = null; }
protected void Page_Load(object sender, EventArgs e) { if (!this.Page.IsPostBack) { int QuoteID = Utils.GetInt(Utils.GetQueryStringValue("QuoteID")); if (!string.IsNullOrEmpty(QuoteID.ToString()) && QuoteID > 0) { EyouSoft.Model.RouteStructure.QuoteTeamInfo ModelRouteTeaminfo = new EyouSoft.Model.RouteStructure.QuoteTeamInfo(); EyouSoft.BLL.RouteStructure.Quote BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); ModelRouteTeaminfo = BllQuote.GetQuoteInfo(QuoteID); if (ModelRouteTeaminfo != null) { //询价单位 this.Txt_Inquiry.Text = ModelRouteTeaminfo.QuoteUnitsName; //联系人 this.Txt_Contact.Text = ModelRouteTeaminfo.ContactName; //联系电话 this.Txt_TelPhone.Text = ModelRouteTeaminfo.ContactTel; //预计出团时间 this.Txt_GroupStarTime.Text = ModelRouteTeaminfo.TmpLeaveDate.ToString("yyyy-MM-dd"); //人数 this.Txt_Numbers.Text = ModelRouteTeaminfo.PeopleNum.ToString(); //客人要求 IList <EyouSoft.Model.TourStructure.TourServiceInfo> TourServiceInfoList = ModelRouteTeaminfo.Requirements; if (TourServiceInfoList != null && TourServiceInfoList.Count > 0) { this.rptList.DataSource = TourServiceInfoList; this.rptList.DataBind(); } //价格组成 IList <EyouSoft.Model.TourStructure.TourTeamServiceInfo> TourTeamServiceInfolist = ModelRouteTeaminfo.Services; if (TourTeamServiceInfolist.Count > 0 && TourTeamServiceInfolist != null) { this.repPrices.DataSource = TourTeamServiceInfolist; this.repPrices.DataBind(); } //备注信息 this.Txt_RemarksBottom.Text = ModelRouteTeaminfo.Remark; TourTeamServiceInfolist = null; TourServiceInfoList = null; } } } }
protected void DelQouteList(int QouteID) { bool IsTrue = false; BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); IsTrue = BllQuote.DeleteTourTeamQuote(QouteID); if (IsTrue) { Response.Clear(); Response.Write("1"); Response.End(); } else { Response.Clear(); Response.Write("No"); Response.End(); } BllQuote = null; }
/// <summary> /// 页面初始化方法 /// </summary> /// <param name="tourId"></param> private void DataInit(string tourId) { EyouSoft.BLL.TourStructure.Tour bll = new EyouSoft.BLL.TourStructure.Tour(SiteUserInfo); EyouSoft.Model.TourStructure.TourBaseInfo model = bll.GetTourInfo(tourId); EyouSoft.Model.TourStructure.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(); } } } }
protected void Page_Load(object sender, EventArgs e) { #region 除报价信息 string action = Utils.GetQueryStringValue("action"); if (action == "delete") { string QuoteID = Utils.GetQueryStringValue("Majorid"); if (!string.IsNullOrEmpty(QuoteID) && Utils.GetInt(QuoteID) > 0) { this.DelQouteList(Utils.GetInt(QuoteID)); } } #endregion #region 初始化报价信息 if (action == "update") { this.InitBindQuoteList(); this.hideType.Value = "update"; string QuoteID = Utils.GetQueryStringValue("QuoteID"); if (!string.IsNullOrEmpty(QuoteID) && Utils.GetInt(QuoteID) > 0) { BllQuote = new EyouSoft.BLL.RouteStructure.Quote(); ModelRouteTeaminfo = new EyouSoft.Model.RouteStructure.QuoteTeamInfo(); ModelRouteTeaminfo = BllQuote.GetQuoteInfo(Utils.GetInt(QuoteID)); if (ModelRouteTeaminfo != null) { //询价单位编号 this.hidCustId.Value = ModelRouteTeaminfo.QuoteUnitsId.ToString(); //询价单位 this.Txt_Inquiry.Value = ModelRouteTeaminfo.QuoteUnitsName; //联系人 this.Txt_Contact.Value = ModelRouteTeaminfo.ContactName; //联系电话 this.Txt_TelPhone.Value = ModelRouteTeaminfo.ContactTel; //预计出团时间 this.Txt_GroupStarTime.Value = ModelRouteTeaminfo.TmpLeaveDate.ToString("yyyy-MM-dd"); //人数 this.Txt_Numbers.Value = ModelRouteTeaminfo.PeopleNum.ToString(); //客人要求 this.ProjectControl.SetList = ModelRouteTeaminfo.Requirements; this.ProjectControl.SetDataList(); //价格组成 this.PriceControl1.SetList = ModelRouteTeaminfo.Services; this.PriceControl1.TotalAmount = ModelRouteTeaminfo.SelfQuoteSum; //备注 this.Txt_RemarksBottom.Value = ModelRouteTeaminfo.Remark; } } ModelRouteTeaminfo = null; BllQuote = null; } if (!this.Page.IsPostBack) { this.InitBindQuoteList(); #region 计调员 int areaid = Utils.GetInt(Utils.GetQueryStringValue("areaid")); if (areaid > 0) { EyouSoft.BLL.CompanyStructure.Area area = new EyouSoft.BLL.CompanyStructure.Area(); EyouSoft.Model.CompanyStructure.Area marea = area.GetModel(areaid); if (marea != null) { ddl_Oprator.DataSource = marea.AreaUserList; ddl_Oprator.DataTextField = "ContactName"; ddl_Oprator.DataValueField = "userid"; ddl_Oprator.DataBind(); } } #endregion } #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 }