/// <summary> /// 初始化 /// </summary> private void DataInit(string userName) { //获取分页参数并强转 pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page")); string deptId = Utils.GetQueryStringValue("deptId"); EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch(); searchModel.ContactName = userName; searchModel.UserStatus = EyouSoft.Model.EnumType.ComStructure.UserStatus.正常; if (deptId != "") { searchModel.DeptId = Utils.GetInt(deptId); } IList <EyouSoft.Model.ComStructure.MComUser> userList = new EyouSoft.BLL.ComStructure.BComUser().GetList(pageIndex, pageSize, ref recordCount, SiteUserInfo.CompanyId, searchModel); if (userList != null && userList.Count > 0) { listCount = userList.Count; this.rptList.DataSource = userList; this.rptList.DataBind(); BindPage(); } else { this.lblMsg.Text = "没有相关数据!"; this.ExporPageInfoSelect1.Visible = false; } //绑定分页 BindPage(); }
public void ProcessRequest(HttpContext context) { string q = Utils.GetQueryStringValue("q"); string companyID = Utils.GetQueryStringValue("companyID"); context.Response.ContentType = "text/plain"; StringBuilder sb = new StringBuilder(); if (q != "" && companyID != "") { EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch(); //searchModel.UserName = q; searchModel.ContactName = q; int recordCount = 0; IList <EyouSoft.Model.ComStructure.MComUser> userList = new EyouSoft.BLL.ComStructure.BComUser().GetList(1, 10, ref recordCount, companyID, searchModel); if (userList != null && userList.Count > 0) { for (int i = 0; i < userList.Count; i++) { sb.Append(userList[i].ContactName + "|" + userList[i].UserId + "|" + userList[i].DeptId + "|" + userList[i].DeptName + "\n"); } } else { sb.Append("未找到该记录| | |"); } } context.Response.Write(sb.ToString()); }
protected void btnSave_Click(object sender, EventArgs e) { string powerIds = string.Empty; int roleId = Utils.GetInt(this.ddlRole.SelectedValue); EyouSoft.BLL.ComStructure.BComUser BComUserBll = new EyouSoft.BLL.ComStructure.BComUser(); int length = Utils.GetFormValues("chkPower").Length; for (int i = 0; i < length; i++) { powerIds += Utils.GetFormValues("chkPower")[i] + ","; } if (powerIds != "") { powerIds = powerIds.Trim(','); } if (BComUserBll.UpdatePrivs(UserID, SiteUserInfo.CompanyId, roleId, powerIds)) { EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('修改成功');parent.Boxy.getIframeDialog('{0}').hide();window.parent.location.reload();", Utils.GetQueryStringValue("iframeId"), Utils.GetQueryStringValue("sl"))); } else { EyouSoft.Common.Function.MessageBox.ResponseScript(this, string.Format("tableToolbar._showMsg('修改失败');parent.Boxy.getIframeDialog('{0}').hide();window.parent.location.reload();", Utils.GetQueryStringValue("iframeId"), Utils.GetQueryStringValue("sl"))); } }
/// <summary> /// init info /// </summary> void InitInfo() { var info = new EyouSoft.BLL.TourStructure.BSingleService().GetSingleServiceExtendByTourId(TourId); if (info == null) { Utils.RCWE("异常请求"); } if (info.CompanyId != SiteUserInfo.CompanyId) { Utils.RCWE("异常请求"); } if (info.PlanBaseInfoList == null || info.PlanBaseInfoList.Count == 0) { Utils.RCWE("异常请求:不存在的供应商安排"); } txtCompanyName.Text = SiteUserInfo.CompanyName; txtXiaoShouYuanName.Text = info.SellerName; var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(info.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { txtXiaoShouYuanTelephone.Text = xiaoShouYuanInfo.ContactTel; txtXiaoShouYuanFax.Text = xiaoShouYuanInfo.ContactFax; } ltrTourCode.Text = info.TourCode; EyouSoft.Model.PlanStructure.MPlanBaseInfo anPaiInfo = null; foreach (var item in info.PlanBaseInfoList) { if (item.PlanId == AnPaiId) { anPaiInfo = item; break; } } if (anPaiInfo == null) { Utils.RCWE("异常请求:不存在的供应商安排"); } ltrJuTiAnPai.Text = Utils.TextareaToHTML(anPaiInfo.GuideNotes); ltrFeiYongMingXi.Text = Utils.TextareaToHTML(anPaiInfo.CostDetail); ltrShuLiang.Text = anPaiInfo.Num.ToString(); ltrZhiFuFangShi.Text = anPaiInfo.PaymentType.ToString(); ltrJieSuanJinE.Text = anPaiInfo.Confirmation.ToString("C2"); txtGysName.Text = anPaiInfo.SourceName; txtGysLxr.Text = anPaiInfo.ContactName; txtGysTelephone.Text = anPaiInfo.ContactPhone; txtGysFax.Text = anPaiInfo.ContactFax; ltrQianFaRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); }
/// <summary> /// 用户启用 /// </summary> protected void StartUser() { string ids = Utils.GetQueryStringValue("ids").Trim(','); bool result = new EyouSoft.BLL.ComStructure.BComUser().SetUserStatus(ids, SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.UserStatus.正常); if (result) { Response.Write(UtilsCommons.AjaxReturnJson("1", "启用成功!")); } else { Response.Write(UtilsCommons.AjaxReturnJson("0", "启用失败!")); } }
/// <summary> /// 修改密码 /// </summary> /// <returns></returns> private string DoUpdate() { string Result = string.Empty; string oldPwd = EyouSoft.Common.Utils.GetFormValue("txtOldPwd"); string newPwd = EyouSoft.Common.Utils.GetFormValue("txtNewPwd"); string surePwd = EyouSoft.Common.Utils.GetFormValue("txtSurePwd"); string old = GetPassword(); if (string.IsNullOrEmpty(oldPwd)) { Result += "原密码不能为空! </br>"; } if (!oldPwd.Equals(old)) { Result += "原密码不正确! </br>"; } if (string.IsNullOrEmpty(newPwd)) { Result += "新密码不能为空! </br>"; } if (!newPwd.Equals(surePwd)) { Result += "新密码与确认新密码必须一致 !</br>"; } if (Result.Length <= 0) { EyouSoft.BLL.ComStructure.BComUser BUser = new EyouSoft.BLL.ComStructure.BComUser(); if (BUser.PwdModify(SiteUserInfo.UserId, old, surePwd)) { Result = EyouSoft.Common.UtilsCommons.AjaxReturnJson("1", "密码修改成功,请重新登录。正在跳转..."); } else { Result = EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", "密码修改失败!"); } } else { Result = EyouSoft.Common.UtilsCommons.AjaxReturnJson("0", Result); } return(Result); }
/// <summary> /// init info /// </summary> void InitInfo() { var info = new EyouSoft.BLL.TourStructure.BSingleService().GetSingleServiceExtendByTourId(TourId); if (info == null) { Utils.RCWE("异常请求"); } if (info.CompanyId != SiteUserInfo.CompanyId) { Utils.RCWE("异常请求"); } txtKeHuName.Text = info.BuyCompanyName; txtKeHuLxr.Text = info.ContactName; txtKeHuTelephone.Text = info.ContactTel; var keHuLxrInfo = new EyouSoft.BLL.CrmStructure.BCrmLinkMan().GetLinkManModel(info.ContactDepartId); if (keHuLxrInfo != null) { txtKeHuFax.Text = keHuLxrInfo.Fax; } txtCompanyName.Text = SiteUserInfo.CompanyName; txtXiaoShouYuanName.Text = info.SellerName; var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(info.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { txtXiaoShouYuanTelephone.Text = xiaoShouYuanInfo.ContactTel; txtXiaoShouYuanFax.Text = xiaoShouYuanInfo.ContactFax; } ltrOrderCode.Text = info.OrderCode; rptJuTiYaoQiu.DataSource = info.TourTeamPriceList; rptJuTiYaoQiu.DataBind(); ltrHeTongJinE.Text = info.TourIncome.ToString("C2"); rptYouKe.DataSource = info.TourOrderTravellerList; rptYouKe.DataBind(); ltrQianFaRiQi.Text = DateTime.Now.ToString("yyyy-MM-dd"); }
/// <summary> /// 页面初始化 /// </summary> protected void PageInit() { IList <EyouSoft.Model.ComStructure.MComUser> list = null; //部门名称 string departName = Utils.GetQueryStringValue(BelongDepart.SelectNameClient); //部门编号 int departId = Utils.GetInt(Utils.GetQueryStringValue(BelongDepart.SelectIDClient)); BelongDepart.SectionID = departId.ToString(); BelongDepart.SectionName = departName; pageIndex = Utils.GetInt(Utils.GetQueryStringValue("page"), 1); EyouSoft.Model.ComStructure.MComUserSearch searchModel = new EyouSoft.Model.ComStructure.MComUserSearch(); searchModel.ContactName = Utils.GetQueryStringValue("name"); searchModel.UserName = Utils.GetQueryStringValue("username"); searchModel.DeptId = departId; searchModel.DeptName = departName; searchModel.RoleId = Utils.GetIntNull(Utils.GetQueryStringValue("txtRoleId")); if (Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.ComStructure.UserStatus), Utils.GetQueryStringValue("txtStatus")) != null) { searchModel.UserStatus = (EyouSoft.Model.EnumType.ComStructure.UserStatus?)Utils.GetEnumValueNull(typeof(EyouSoft.Model.EnumType.ComStructure.UserStatus), Utils.GetQueryStringValue("txtStatus")); } else { searchModel.UserStatus = EyouSoft.Model.EnumType.ComStructure.UserStatus.正常; } list = new EyouSoft.BLL.ComStructure.BComUser().GetList(pageIndex, pageSize, ref recordCount, SiteUserInfo.CompanyId, searchModel); if (list != null && list.Count > 0) { this.repList.DataSource = list; this.repList.DataBind(); BindPage(); } else { ExporPageInfoSelect1.Visible = false; this.repList.EmptyText = "<tr><td colspan=\"12\" align=\"center\">未找到相关记录!</td></tr>"; } }
/// <summary> /// 绑定数据源 /// </summary> private void BindSource() { EyouSoft.BLL.CrmStructure.BCrm bCrm = new EyouSoft.BLL.CrmStructure.BCrm(); EyouSoft.Model.CrmStructure.MCrm mCrm = bCrm.GetInfo(SiteUserInfo.TourCompanyInfo.CompanyId); //查询国家、省市区域的 EyouSoft.BLL.ComStructure.BComCity bComCity = new EyouSoft.BLL.ComStructure.BComCity(); EyouSoft.Model.ComStructure.MCPCC m = bComCity.GetCPCD(CurrentUserCompanyID, mCrm.CountryId, mCrm.ProvinceId, mCrm.CityId, mCrm.CountyId); if (m != null) { this.lblCountry.Text = m.CountryName; this.lblProvice.Text = m.ProvinceName; this.lblCity.Text = m.CityName; this.lblCounty.Text = m.CountyName; } this.lblName.Text = mCrm.Name; this.lblAddress.Text = mCrm.Address; this.lblOrganizationCode.Text = mCrm.OrganizationCode; this.lblLegalRepresentative.Text = mCrm.LegalRepresentative; this.lblLegalRepresentativeMobile.Text = mCrm.LegalRepresentativeMobile; this.lblLegalRepresentativePhone.Text = mCrm.LegalRepresentativePhone; this.lblLicense.Text = mCrm.License; this.lblFinancialName.Text = mCrm.FinancialName; this.lblFinancialPhone.Text = mCrm.FinancialPhone; this.lblFinancialMobile.Text = mCrm.FinancialMobile; //查询销售员 EyouSoft.BLL.ComStructure.BComUser bUser = new EyouSoft.BLL.ComStructure.BComUser(); EyouSoft.Model.ComStructure.MComUser user = bUser.GetModel(mCrm.SellerId, SiteUserInfo.CompanyId); if (null != user) { this.lblSeller.Text = user.UserName; } this.lblBrevityCode.Text = mCrm.BrevityCode; this.lblRebatePolicy.Text = mCrm.RebatePolicy; }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit() { System.Text.StringBuilder RolePower = new System.Text.StringBuilder(); IList <EyouSoft.Model.ComStructure.MComRole> RoleList = new EyouSoft.BLL.ComStructure.BComRole().GetList(SiteUserInfo.CompanyId); if (RoleList != null && RoleList.Count > 0) { RolePower.Append("["); foreach (var item in RoleList) { RolePower.Append("{"); RolePower.AppendFormat("RoleId: '{0}',PowerIds: '{1}'", item.Id, item.RoleChilds); RolePower.Append("},"); } RolePower.Append("]"); } hidPower.Value = RolePower.ToString(); this.ddlRole.DataTextField = "RoleName"; this.ddlRole.DataValueField = "Id"; this.ddlRole.DataSource = RoleList; this.ddlRole.DataBind(); this.ddlRole.Items.Insert(0, new ListItem("请选择", "0")); if (ddlRole.Items.FindByValue(RoleID) != null) { ddlRole.Items.FindByValue(RoleID).Selected = true; } string[] PowerIds = new EyouSoft.BLL.ComStructure.BComUser().GetPrivs(UserID, SiteUserInfo.CompanyId).Split(','); if (PowerIds == null || PowerIds[0] == "") { if (!string.IsNullOrEmpty(RoleID)) { EyouSoft.Model.ComStructure.MComRole model = new EyouSoft.BLL.ComStructure.BComRole().GetModel(Utils.GetInt(RoleID), SiteUserInfo.CompanyId); if (model != null) { PowerIds = model.RoleChilds.Split(','); } } } System.Text.StringBuilder str = new System.Text.StringBuilder(); System.Text.StringBuilder Privs = null; EyouSoft.BLL.SysStructure.BSysMenu BSysMenuBll = new EyouSoft.BLL.SysStructure.BSysMenu(); IList <EyouSoft.Model.SysStructure.MComMenu1Info> list = BSysMenuBll.GetComMenus(SiteUserInfo.SysId); if (list != null) { //一级栏目 for (int i = 0; i < list.Count; i++) { str.Append("<table width=\"99%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" align=\"center\" class=\"quanxian_add_bottom\"> <tbody><tr>"); str.AppendFormat(" <td width=\"92\" height=\"25\" align=\"center\" class=\"quanxian_add\">{0}</td>", list[i].Name); str.AppendFormat("<td><span> <input type=\"checkbox\" name=\"chkAll\" value=\"{0}\"/></span>全选</td>", list[i].MenuId); str.Append(" </tr></tbody></table>"); str.Append("<div class=\"hr_5\"></div>"); str.Append(" <table width=\"99%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\" bgcolor=\"#85c1dd\" align=\"center\"><tbody>"); if (list[i].Menu2s != null) { //每行显示4列,共循环多少次 for (int k = 0; k <= list[i].Menu2s.Count / 4; k++) { Privs = new System.Text.StringBuilder(); str.Append("<tr>"); Privs.Append("<tr>"); for (int j = k * 4; j < list[i].Menu2s.Count; j++) { //当前权限是否选中 bool check = false; str.AppendFormat("<th width=\"25%\" height=\"26\" bgcolor=\"#BDDCF4\" align=\"left\"> <input type=\"checkbox\" MenuId =\"{0}\" Menu2Id=\"{1}\" name=\"chkMenu\" />{2}</th>", list[i].MenuId, list[i].Menu2s[j].MenuId, list[i].Menu2s[j].Name); Privs.Append("<td style=\" vertical-align:top;\"><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"); for (int t = 0; t < list[i].Menu2s[j].Privs.Count; t++) { for (int p = 0; p < PowerIds.Length; p++) { check = false; if (Utils.GetInt(PowerIds[p]) == list[i].Menu2s[j].Privs[t].PrivsId) { check = true; break; } } Privs.AppendFormat("<tr><td width=\"25%\" height=\"26\" bgcolor=\"#FFFFFF\" align=\"left\"> <input type=\"checkbox\" name=\"chkPower\" Menu2Id=\"{0}\" value=\"{1}\" {2}/>{3}</td></tr>", list[i].Menu2s[j].MenuId, list[i].Menu2s[j].Privs[t].PrivsId, check ? "checked=\"checked\"" : "", list[i].Menu2s[j].Privs[t].Name); } Privs.Append("</table></td>"); if ((j != 0 && (j + 1) % 4 == 0) || j + 1 == list[i].Menu2s.Count) { str.Append("</tr>"); Privs.Append("<tr>"); str.Append(Privs.ToString()); break; } } } } str.Append("</tbody></table><div class=\"hr_5\"></div>"); PowerStr = str.ToString(); } } }
/// <summary> /// 初始化页面信息 /// </summary> private void InitPage() { EyouSoft.Model.TourStructure.MOrderSale model = new EyouSoft.BLL.TourStructure.BTourOrder().GetSettlementOrderByOrderId(OrderId, TourType.Value); if (model == null) { Utils.RCWE(UtilsCommons.AjaxReturnJson("0", "错误的请求:未找到相关数据。")); } if (model.TourType == EyouSoft.Model.EnumType.TourStructure.TourType.单项服务) { var _url = new EyouSoft.BLL.ComStructure.BComSetting().GetPrintUri(SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.单项业务游客确认单); if (!string.IsNullOrEmpty(_url) && _url != "javascript:void(0)") { Response.Redirect(_url + "?tourid=" + model.TourId); Response.End(); } } //名称/联系人 this.txtCompanyName.Text = model.BuyCompanyName; this.txtCompanyContactName.Text = model.ContactName; this.txtContact.Text = model.ContactTel; this.txtFax.Text = model.ContactFax; //公司名、联系人 this.txtSelfName.Text = this.SiteUserInfo.CompanyName; /*this.txtSelfContactName.Text = this.SiteUserInfo.Name; * this.txtSelfContact.Text = this.SiteUserInfo.Telephone; * this.txtSelfFax.Text = this.SiteUserInfo.Fax;*/ //线路名称 this.ltr1.Text = (IsYouKeQueRenDan ? "" : "团队结算单 ") + model.RouteName; //接团时间 this.lbLDate.Text = model.LDate.HasValue ? model.LDate.Value.ToString("yyyy-MM-dd") : ""; //人数 this.lbPersonNum.Text = model.Adults + " + " + model.Childs; //整团 if (!string.IsNullOrEmpty(model.ServiceStandard)) { this.lbServiceStandard.Text = model.ServiceStandard; } else { this.ph_Standard.Visible = false; } //分项 if (model.TourTeamPriceList != null && model.TourTeamPriceList.Count > 0) { this.rpt_QuoteList.DataSource = model.TourTeamPriceList; this.rpt_QuoteList.DataBind(); this.Count1 = model.TourTeamPriceList.Count; } else { this.ph_Quote.Visible = false; } //报价信息 string _baoJiaHtml = string.Empty; if (model.BaoJiaBiaoZhunId > 0 && model.KeHuLevId > 0) { _baoJiaHtml += model.BaoJiaBiaoZhunName + "/"; _baoJiaHtml += model.KeHuLevName; } if (!string.IsNullOrEmpty(_baoJiaHtml)) { _baoJiaHtml += " "; } ltrBaoJia.Text = _baoJiaHtml; //成人单价 this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney); //成人数 this.lbAdultCount.Text = model.Adults.ToString(); //儿童单价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney); //儿童数 this.lbChildCount.Text = model.Childs.ToString(); //其他费用 if (model.OtherCost > 0) { this.lbOtherCost.Text = "+ 其它费用:<b>" + EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "</b>"; } //销售增加费用、备注 if (model.SaleAddCost != 0 || !string.IsNullOrEmpty(model.SaleAddCostRemark)) { phZengJiaFeiYong.Visible = true; this.lbSumPriceAddCost.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SaleAddCost, ProviderToMoney); this.lbSumPriceAddCostRemark.Text = model.SaleAddCostRemark; } //销售减少费用、备注 if (model.SaleReduceCost != 0 || !string.IsNullOrEmpty(model.SaleReduceCostRemark)) { phJianShaoFeiYong.Visible = true; this.lbSumPriceReduceCost.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SaleReduceCost, ProviderToMoney); this.lbSumPriceReduceCostRemark.Text = model.SaleReduceCostRemark; } //合计金额 this.lbSumPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPrice, ProviderToMoney); //退款信息 if (model.TourOrderSalesList != null && model.TourOrderSalesList.Count > 0) { rpt_BackList.DataSource = model.TourOrderSalesList; rpt_BackList.DataBind(); Count2 = model.TourOrderSalesList.Count; } else { ph_BackList.Visible = false; } //变更增加、备注 if (model.SumPriceAddCost != 0 || !string.IsNullOrEmpty(model.SumPriceAddCostRemark)) { phBianGengZengJiaFeiYong.Visible = true; this.lbChangeAddMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPriceAddCost, ProviderToMoney); this.lbChangeRemark.Text = model.SumPriceAddCostRemark; } //变更减少、备注 if (model.SumPriceReduceCost != 0 || !string.IsNullOrEmpty(model.SumPriceReduceCostRemark)) { phBianGengJianShaoFeiYong.Visible = true; this.lbChangelessonMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPriceReduceCost, ProviderToMoney); this.lbChangeRemarks.Text = model.SumPriceReduceCostRemark; } //合同确认金额信息 if (model.ConfirmMoneyStatus) { phQueRenJinE.Visible = true; //订单确认金额 this.lbComfirmMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ConfirmMoney, ProviderToMoney); //已支付金额 this.lbPayMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.CheckMoney, ProviderToMoney); //尚欠金额 //decimal sumPrices = model.SumPrice; //decimal addPrices = model.SumPriceAddCost; //decimal lessPrices = model.SumPriceReduceCost; //decimal payMoney = model.CheckMoney; //decimal countPrices = sumPrices + addPrices - lessPrices; //decimal debtMoney = countPrices - payMoney; //this.lbDebtMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(debtMoney, ProviderToMoney); lbDebtMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ConfirmMoney - model.CheckMoney, ProviderToMoney); //还款年 月 日 //this.txtYear.Text = DateTime.Now.Year.ToString(); //this.txtMonth.Text = model.PayMentMonth; //this.txtDate.Text = model.PayMentDay; //InitYinHangZhangHu(); } else { if (phBianGengZengJiaFeiYong.Visible || phBianGengJianShaoFeiYong.Visible) { phQueRenJinE.Visible = true; lbComfirmMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ConfirmMoney, ProviderToMoney); lbPayMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.CheckMoney, ProviderToMoney); lbDebtMoney.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ConfirmMoney - model.CheckMoney, ProviderToMoney); } } this.lbDate.Text = DateTime.Now.ToString("yyyy/MM/dd"); TourId = model.TourId; ltr2.Text = "订单号:" + model.OrderCode; if (model != null && !string.IsNullOrEmpty(model.SellerId)) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtSelfContactName.Text = xiaoShouYuanInfo.ContactName; this.txtSelfContact.Text = xiaoShouYuanInfo.ContactTel; this.txtSelfFax.Text = xiaoShouYuanInfo.ContactFax; } } if (!string.IsNullOrEmpty(model.ConfirmRemark)) { phJinEBianGengShuoMing.Visible = true; ltrJinEBianGengShuoMing.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ConfirmRemark); } this.txtYear.Text = DateTime.Now.Year.ToString(); InitYinHangZhangHu(); }
/// <summary> /// 保存按钮点击事件执行方法 /// </summary> protected string PageSave() { string msg = string.Empty; #region 获取表单 //线路区域编号 int areaID = Utils.GetInt(Utils.GetFormValue("sltArea")); //线路编号 string routeID = Utils.GetFormValue(this.hideRouteID.UniqueID); //线路名称 string routeName = Utils.GetFormValue(this.txt_RouteName.UniqueID); //天数 int days = Utils.GetInt(Utils.GetFormValue(this.txt_Days.UniqueID)); //销售员编号 string sellsID = Utils.GetFormValue(this.SellsSelect1.SellsIDClient); //销售员名称 string sellsName = Utils.GetFormValue(this.SellsSelect1.SellsNameClient); //报价员 取当前登录用户 EyouSoft.Model.TourStructure.MOperatorInfo operatorModel = new EyouSoft.Model.TourStructure.MOperatorInfo(); operatorModel.OperatorId = this.SiteUserInfo.UserId; operatorModel.Name = this.SiteUserInfo.Name; operatorModel.Phone = this.SiteUserInfo.Telephone; //出发交通 string successsStraffBegin = Utils.GetFormValue(this.txtSuccesssStraffBegin.UniqueID); //返回交通 string successsStraffEnd = Utils.GetFormValue(this.txtSuccesssStraffEnd.UniqueID); //集合方式 string successGather = Utils.GetFormValue(this.txtSuccessGather.UniqueID); //出团时间 string[] successDateBegin = Utils.GetFormValue(this.hideLeaveDate.UniqueID).Split(','); //预控人数 int planPeopleNumber = Utils.GetInt(Utils.GetFormValue(this.txtPeopleCount.UniqueID)); //行程特色 string planContent = Utils.EditInputText(Utils.GetFormValue(this.txtPlanContent.UniqueID)); //停收时间 int stopDate = Utils.GetInt(Utils.GetFormValue(this.txtStopDate.UniqueID)); //是否同业分销 bool isShowDistribution = Utils.GetFormValue(this.cbxDistribution.UniqueID) == "on" ? true : false; //变更标题 string changeTitle = Utils.GetFormValue("txt_ChangeTitle"); //变更备注 string changeRemark = Utils.GetFormValue("txt_ChangeRemark"); //附件 string filsPath = Utils.GetFormValue(this.UploadControl2.ClientHideID); if (filsPath == "") { filsPath = Utils.GetFormValue("hideOtherFile"); } //签证附件(新) string[] visaUpload = Utils.GetFormValues(this.UploadControl1.ClientHideID); string[] oldVisaUpload = Utils.GetFormValues("hideVisaFile"); //关键字 string searchKey = Utils.GetFormValue(this.txtSearchKey.UniqueID); #endregion #region 表单后台验证 if (areaID == 0) { msg = "请选择线路区域!"; } if (routeName == "") { msg += "<br />请输入线路名称!"; } if (days == 0) { msg += "<br />请输入天数!"; } if (planPeopleNumber == 0) { msg += "<br />请输入预控人数!"; } if (sellsID == "") { msg += "<br />请输入销售员!"; } if (successDateBegin.Length == 0) { msg += "<br />请选择出团日期!"; } if (msg != "") { return(UtilsCommons.AjaxReturnJson("0", msg)); } #endregion EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourSanPinInfo model = new EyouSoft.Model.TourStructure.MTourSanPinInfo(); string act = Utils.GetQueryStringValue("act"); if (act == "update") { model.TourId = Utils.GetQueryStringValue("id"); } model.CompanyId = this.SiteUserInfo.CompanyId; model.AreaId = areaID; string costCalculation = string.Empty; EyouSoft.Model.TourStructure.MTourService tourService = UtilsCommons.GetTourService(out costCalculation); model.CostCalculation = costCalculation; model.Gather = successGather; model.PlanPeopleNumber = planPeopleNumber; model.LTraffic = successsStraffBegin; model.OperatorInfo = new EyouSoft.Model.TourStructure.MOperatorInfo(); model.OperatorInfo.OperatorId = this.SiteUserInfo.UserId; model.OperatorInfo.Name = this.SiteUserInfo.Name; model.OperatorInfo.Phone = this.SiteUserInfo.Telephone; model.PlanFeature = planContent; model.RouteId = routeID; model.RouteName = routeName; model.RTraffic = successsStraffEnd; model.StopDays = stopDate; model.IsShowDistribution = isShowDistribution; model.TourChangeTitle = changeTitle; model.TourChangeContent = changeRemark; model.KeyName = searchKey; #region 附件 if (filsPath != "") { string[] filesArray = filsPath.Split('|'); if (filesArray.Length > 1) { model.FilePath = filesArray[1]; } } #endregion #region 签证附件 IList <EyouSoft.Model.ComStructure.MComAttach> visaList = null; if (visaUpload.Length > 0) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); for (int i = 0; i < visaUpload.Length; i++) { if (visaUpload[i].Trim() != "") { if (visaUpload[i].Split('|').Length > 1) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = 0; visaModel.FilePath = visaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.计划签证资料; visaModel.Name = visaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } } } if (oldVisaUpload.Length > 0) { if (visaList == null) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); } for (int i = 0; i < oldVisaUpload.Length; i++) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = Utils.GetInt(oldVisaUpload[i].Split('|')[2]); visaModel.FilePath = oldVisaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.计划签证资料; visaModel.Name = oldVisaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } model.VisaFileList = visaList; #endregion //获得销售员信息实体 EyouSoft.Model.ComStructure.MComUser sellsModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(sellsID, SiteUserInfo.CompanyId); if (sellsModel != null) { model.SaleInfo = new EyouSoft.Model.TourStructure.MSaleInfo(); model.SaleInfo.SellerId = sellsID; model.SaleInfo.Name = sellsName; model.SaleInfo.Phone = sellsModel.ContactMobile; model.SaleInfo.DeptId = sellsModel.DeptId; } model.TourDays = days; model.TourPlan = UtilsCommons.GetPlanList(); model.TourService = tourService; model.MTourPriceStandard = UtilsCommons.GetPriceStandard(); model.TourCarLocation = GetTourCarLocationList(); model.TourCarType = GetTourCarTypeList(); model.LDate = null; model.RDate = null; #region 无需赋值 //model.QuoteRemark //model.RealPeopleNumber //model.Review //model.ReviewTime //model.TourPlaner //model.TourPlanItem //model.TourPlanStatus //model.PeopleNumberLast //model.GuideList = null; //model.IsChange = false; //model.IsReview //model.IsSubmit //model.IsSure 列表 //model.LeavePeopleNumber #endregion //超限赋值 switch (type) { case 1: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线; break; case 2: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼; break; case 3: model.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼; break; } if (act == "add" || act == "copy") { bool result = false; model.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划; model.TourChildrenInfo = new List <MTourChildrenInfo>(); for (int i = 0; i < successDateBegin.Length; i++) { MTourChildrenInfo childModel = new MTourChildrenInfo(); childModel.LDate = Utils.GetDateTime(successDateBegin[i]); model.TourChildrenInfo.Add(childModel); } result = bll.AddTourSanPin(model); if (result) { msg = UtilsCommons.AjaxReturnJson("1", "新增散拼计划 成功,正在跳转"); } else { msg = UtilsCommons.AjaxReturnJson("0", "新增散拼计划 失败,请稍后再试!"); } } if (act == "update" && model.TourId != "") { model.UpdateTime = DateTime.Now; model.LDate = Utils.GetDateTime(successDateBegin[0]); if (bll.UpdateTourSanPin(model)) { msg = UtilsCommons.AjaxReturnJson("1", "修改散拼计划 成功,正在跳转.."); } else { msg = UtilsCommons.AjaxReturnJson("0", "修改散拼计划 失败,请稍后再试!"); } } return(msg); }
/// <summary> /// 初始化信息 /// </summary> private void InitInfo() { string orderid = string.Empty; EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.TourStructure.MTourBaseInfo baseModel = bll.GetTourInfo(TourId); if (baseModel == null) { RCWE("异常请求"); } EyouSoft.Model.TourStructure.MTourTeamInfo teamModel = null; EyouSoft.Model.TourStructure.MTourSanPinInfo sanpinModel = null; switch (baseModel.TourType) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境团队: case EyouSoft.Model.EnumType.TourStructure.TourType.地接团队: case EyouSoft.Model.EnumType.TourStructure.TourType.组团团队: teamModel = (EyouSoft.Model.TourStructure.MTourTeamInfo)baseModel; break; case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务: this.TGuideNote.Visible = false; this.TReceiveJourney.Visible = false; this.TService.Visible = false; this.ph_rpt_OrderinfoList.Visible = false; return; default: sanpinModel = (EyouSoft.Model.TourStructure.MTourSanPinInfo)baseModel; break; } #region 订单信息 EyouSoft.BLL.TourStructure.BTourOrder bllorder = new EyouSoft.BLL.TourStructure.BTourOrder(); EyouSoft.Model.TourStructure.MOrderSum ordersum = new EyouSoft.Model.TourStructure.MOrderSum(); IList <EyouSoft.Model.TourStructure.MTourOrder> MtourOrder = bllorder.GetTourOrderListById(TourId, ref ordersum).Where(c => c.OrderStatus == EyouSoft.Model.EnumType.TourStructure.OrderStatus.已成交).ToList(); if (MtourOrder != null && MtourOrder.Count > 0) { this.rpt_OrderinfoList.DataSource = MtourOrder; this.rpt_OrderinfoList.DataBind(); } else { this.ph_rpt_OrderinfoList.Visible = false; } #endregion #region 团队信息 if (teamModel != null) { this.lbRouteName.Text = teamModel.RouteName; this.lbTourCode.Text = teamModel.TourCode; this.lbdayCount.Text = teamModel.TourDays.ToString(); this.lbstarttime.Text = UtilsCommons.GetDateString(teamModel.LDate, ProviderToDate); this.lbendtime.Text = UtilsCommons.GetDateString(teamModel.RDate, ProviderToDate); if (teamModel.GuideList != null && teamModel.GuideList.Count > 0) { string guidelist = string.Empty; for (int i = 0; i < teamModel.GuideList.Count; i++) { if (i == teamModel.GuideList.Count - 1) { guidelist += teamModel.GuideList[i].Name; } else { guidelist += teamModel.GuideList[i].Name + "、"; } } this.lbguidename.Text = guidelist; } this.lbpeoplecount.Text = teamModel.PlanPeopleNumber.ToString(); if (teamModel.TourPlaner != null && teamModel.TourPlaner.Count > 0) { string planerlist = string.Empty; for (int i = 0; i < teamModel.TourPlaner.Count; i++) { if (i == teamModel.TourPlaner.Count - 1) { planerlist += teamModel.TourPlaner[i].Planer; } else { planerlist += teamModel.TourPlaner[i].Planer + "、"; } } var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.TourPlaner[0].PlanerId, CurrentUserCompanyID); if (jiDiaoInfo != null) { planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel; } this.lbplander.Text = planerlist; } if (teamModel.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(teamModel.SaleInfo.SellerId, CurrentUserCompanyID); if (xiaoShouYuanInfo != null) { teamModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile; teamModel.SaleInfo.Phone = xiaoShouYuanInfo.ContactTel; } this.lbsellerinfo.Text = teamModel.SaleInfo.Name + " " + teamModel.SaleInfo.Mobile + " " + teamModel.SaleInfo.Phone; } } else if (sanpinModel != null) { this.lbRouteName.Text = baseModel.RouteName; this.lbTourCode.Text = baseModel.TourCode; this.lbdayCount.Text = baseModel.TourDays.ToString(); this.lbstarttime.Text = UtilsCommons.GetDateString(baseModel.LDate, ProviderToDate); this.lbendtime.Text = UtilsCommons.GetDateString(baseModel.RDate, ProviderToDate); if (baseModel.GuideList != null && baseModel.GuideList.Count > 0) { string guidelist = string.Empty; for (int i = 0; i < baseModel.GuideList.Count; i++) { if (i == baseModel.GuideList.Count - 1) { guidelist += baseModel.GuideList[i].Name; } else { guidelist += baseModel.GuideList[i].Name + "、"; } } this.lbguidename.Text = guidelist; } this.lbpeoplecount.Text = baseModel.PlanPeopleNumber.ToString(); if (baseModel.TourPlaner != null && baseModel.TourPlaner.Count > 0) { string planerlist = string.Empty; for (int i = 0; i < baseModel.TourPlaner.Count; i++) { if (i == baseModel.TourPlaner.Count - 1) { planerlist += baseModel.TourPlaner[i].Planer; } else { planerlist += baseModel.TourPlaner[i].Planer + "、"; } } var jiDiaoInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.TourPlaner[0].PlanerId, CurrentUserCompanyID); if (jiDiaoInfo != null) { planerlist += " " + jiDiaoInfo.ContactMobile + " " + jiDiaoInfo.ContactTel; } this.lbplander.Text = planerlist; } if (baseModel.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(baseModel.SaleInfo.SellerId, CurrentUserCompanyID); if (xiaoShouYuanInfo != null) { baseModel.SaleInfo.Mobile = xiaoShouYuanInfo.ContactMobile; baseModel.SaleInfo.Phone = xiaoShouYuanInfo.ContactTel; } this.lbsellerinfo.Text = baseModel.SaleInfo.Name + " " + baseModel.SaleInfo.Mobile + " " + baseModel.SaleInfo.Phone; } } else { return; } #endregion #region 计调信息 EyouSoft.BLL.PlanStructure.BPlan bllPlan = new EyouSoft.BLL.PlanStructure.BPlan(); EyouSoft.Model.PlanStructure.MPlanBaseInfo planinfo = bllPlan.GetGuidePrint(TourId); #region 导游安排接待行程 if (!string.IsNullOrEmpty(planinfo.ReceiveJourney)) { TReceiveJourney.Visible = true; this.lbReceiveJourney.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ReceiveJourney); } else { TReceiveJourney.Visible = false; } #endregion #region 导游安排服务标准 if (!string.IsNullOrEmpty(planinfo.ServiceStandard)) { TService.Visible = true; this.lbServiceStandard.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.ServiceStandard); } else { TService.Visible = false; } #endregion #region 导游须知 if (!string.IsNullOrEmpty(planinfo.GuideNotes)) { TGuideNote.Visible = true; this.lbGuidNote.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(planinfo.GuideNotes); } else { this.TGuideNote.Visible = false; } #endregion #region 团队支付详单 #region 导游 IList <EyouSoft.Model.PlanStructure.MPlan> GuidePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.导游, null, null, false, null, TourId, PlanState.已落实); GuidePlanList = GetZhiChus(GuidePlanList); if (GuidePlanList != null && GuidePlanList.Count > 0) { this.guid = GuidePlanList.Count; this.rpt_guid.DataSource = GuidePlanList; this.rpt_guid.DataBind(); } else { this.ph_guid.Visible = false; } #endregion #region 地接 IList <EyouSoft.Model.PlanStructure.MPlan> groundPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.地接, null, null, false, null, TourId, PlanState.已落实); groundPlanList = GetZhiChus(groundPlanList); if (groundPlanList != null && groundPlanList.Count > 0) { this.dijie = groundPlanList.Count; this.rpt_dijie.DataSource = groundPlanList; this.rpt_dijie.DataBind(); } else { this.ph_dijie.Visible = false; } #endregion #region 飞机 IList <EyouSoft.Model.PlanStructure.MPlan> phanePlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.飞机, null, null, false, null, TourId, PlanState.已落实); phanePlanList = GetZhiChus(phanePlanList); if (phanePlanList != null && phanePlanList.Count > 0) { this.plane = phanePlanList.Count; this.rpt_plane.DataSource = phanePlanList; this.rpt_plane.DataBind(); } else { this.ph_plane.Visible = false; } #endregion #region 购物 IList <EyouSoft.Model.PlanStructure.MPlan> shopPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.购物, null, null, false, null, TourId, PlanState.已落实); shopPlanList = GetZhiChus(shopPlanList); if (shopPlanList != null && shopPlanList.Count > 0) { this.gouwu = shopPlanList.Count; this.rpt_gouwu.DataSource = shopPlanList; this.rpt_gouwu.DataBind(); } else { this.ph_gouwu.Visible = false; } #endregion #region 国内游轮 IList <EyouSoft.Model.PlanStructure.MPlan> InshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.国内游轮, null, null, false, null, TourId, PlanState.已落实); InshipPlanList = GetZhiChus(InshipPlanList); if (InshipPlanList != null && InshipPlanList.Count > 0) { this.guoneichuan = InshipPlanList.Count; this.rpt_guoneichuan.DataSource = InshipPlanList; this.rpt_guoneichuan.DataBind(); } else { this.ph_guoneichuan.Visible = false; } #endregion #region 涉外游轮 IList <EyouSoft.Model.PlanStructure.MPlan> OutshipPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.涉外游轮, null, null, false, null, TourId, PlanState.已落实); OutshipPlanList = GetZhiChus(OutshipPlanList); if (OutshipPlanList != null && OutshipPlanList.Count > 0) { this.shewaichuan = OutshipPlanList.Count; this.rpt_shewaichuan.DataSource = OutshipPlanList; this.rpt_shewaichuan.DataBind(); } else { this.ph_shewaichuan.Visible = false; } #endregion #region 火车 IList <EyouSoft.Model.PlanStructure.MPlan> trainPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.火车, null, null, false, null, TourId, PlanState.已落实); trainPlanList = GetZhiChus(trainPlanList); if (trainPlanList != null && trainPlanList.Count > 0) { this.train = trainPlanList.Count; this.rpt_train.DataSource = trainPlanList; this.rpt_train.DataBind(); } else { this.ph_train.Visible = false; } #endregion #region 景点 IList <EyouSoft.Model.PlanStructure.MPlan> scenicPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.景点, null, null, false, null, TourId, PlanState.已落实); scenicPlanList = GetZhiChus(scenicPlanList); if (scenicPlanList != null && scenicPlanList.Count > 0) { this.jingdian = scenicPlanList.Count; this.rpt_jingdian.DataSource = scenicPlanList; this.rpt_jingdian.DataBind(); } else { this.ph_jingdian.Visible = false; } #endregion #region 酒店 IList <EyouSoft.Model.PlanStructure.MPlan> hotelPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.酒店, null, null, false, null, TourId, PlanState.已落实); hotelPlanList = GetZhiChus(hotelPlanList); if (hotelPlanList != null && hotelPlanList.Count > 0) { this.hotel = hotelPlanList.Count; this.rpt_hotellistk.DataSource = hotelPlanList; this.rpt_hotellistk.DataBind(); } else { this.ph_hotel.Visible = false; } #endregion #region 领料 IList <EyouSoft.Model.PlanStructure.MPlan> lingliaolPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.领料, null, null, false, null, TourId, PlanState.已落实); lingliaolPlanList = GetZhiChus(lingliaolPlanList); if (lingliaolPlanList != null && lingliaolPlanList.Count > 0) { this.lingliao = lingliaolPlanList.Count; this.rpt_lingliao.DataSource = lingliaolPlanList; this.rpt_lingliao.DataBind(); } else { this.ph_lingliao.Visible = false; } #endregion #region 其它 IList <EyouSoft.Model.PlanStructure.MPlan> otherlPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.其它, null, null, false, null, TourId, PlanState.已落实); otherlPlanList = GetZhiChus(otherlPlanList); if (otherlPlanList != null && otherlPlanList.Count > 0) { this.qita = otherlPlanList.Count; this.rpt_qita.DataSource = otherlPlanList; this.rpt_qita.DataBind(); } else { this.ph_qita.Visible = false; } #endregion #region 汽车 IList <EyouSoft.Model.PlanStructure.MPlan> busPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.汽车, null, null, false, null, TourId, PlanState.已落实); busPlanList = GetZhiChus(busPlanList); if (busPlanList != null && busPlanList.Count > 0) { this.bus = busPlanList.Count; this.rpt_bus.DataSource = busPlanList; this.rpt_bus.DataBind(); } else { this.ph_bus.Visible = false; } #endregion #region 用餐 IList <EyouSoft.Model.PlanStructure.MPlan> yongcanPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用餐, null, null, false, null, TourId, PlanState.已落实); yongcanPlanList = GetZhiChus(yongcanPlanList); if (yongcanPlanList != null && yongcanPlanList.Count > 0) { this.yongcan = yongcanPlanList.Count; this.rpt_yongcan.DataSource = yongcanPlanList; this.rpt_yongcan.DataBind(); } else { this.ph_yongcan.Visible = false; } #endregion #region 用车 IList <EyouSoft.Model.PlanStructure.MPlan> carPlanList = bllPlan.GetList(EyouSoft.Model.EnumType.PlanStructure.PlanProject.用车, null, null, false, null, TourId, PlanState.已落实); carPlanList = GetZhiChus(carPlanList); if (carPlanList != null && carPlanList.Count > 0) { this.chedui = carPlanList.Count; this.rpt_chedui.DataSource = carPlanList; this.rpt_chedui.DataBind(); } else { this.ph_chedui.Visible = false; } #endregion #endregion #endregion }
/// <summary> /// 获取当前用户的明文密码 /// </summary> /// <returns></returns> private string GetPassword() { EyouSoft.BLL.ComStructure.BComUser BUser = new EyouSoft.BLL.ComStructure.BComUser(); EyouSoft.Model.ComStructure.MComUser User = BUser.GetModel(SiteUserInfo.UserId, SiteUserInfo.CompanyId); return(User.Password); }
/// <summary> /// 页面初始化 /// </summary> protected void PageInit() { this.HrSelect1.Isshow = false; string iframeId = Utils.GetQueryStringValue("iframeId"); this.HrSelect1.SetTitle = "姓名"; this.HrSelect1.SModel = "1"; this.HrSelect1.ParentIframeID = iframeId; this.HrSelect1.CallBackFun = "UserEdit.BindGovFile"; this.ddlSex.DataTextField = "Text"; this.ddlSex.DataValueField = "Value"; this.ddlSex.DataSource = EyouSoft.Common.EnumObj.GetList(typeof(EyouSoft.Model.EnumType.GovStructure.Gender)); this.ddlSex.DataBind(); this.ddlSex.Items.Insert(0, new ListItem("请选择", "")); IList <EyouSoft.Model.ComStructure.MComRole> rolelist = new EyouSoft.BLL.ComStructure.BComRole().GetList(SiteUserInfo.CompanyId); this.ddlRoleList.DataTextField = "RoleName"; this.ddlRoleList.DataValueField = "Id"; this.ddlRoleList.DataSource = rolelist; this.ddlRoleList.DataBind(); this.ddlRoleList.Items.Insert(0, new ListItem("请选择", "")); this.ManageDepart.IsNotValid = false; if (!string.IsNullOrEmpty(UserID)) { EyouSoft.Model.ComStructure.MComUser model = new EyouSoft.BLL.ComStructure.BComUser().GetModel(UserID, SiteUserInfo.CompanyId); txtUserName.Text = model.UserName; txtUserName.ReadOnly = true; HrSelect1.HrSelectName = model.ContactName; HrSelect1.HrSelectID = model.GovFileId; HrSelect1.IsDisplay = true; if (this.ddlSex.Items.FindByValue(model.ContactSex.ToString()) != null) { this.ddlSex.SelectedValue = model.ContactSex.ToString(); } this.BelongDepart.SectionID = model.DeptId.ToString(); this.BelongDepart.SectionName = model.DeptName; this.ManageDepart.SectionID = model.DeptIdJG.ToString(); this.ManageDepart.SectionName = model.JGDeptName; if (this.ddlRoleList.Items.FindByValue(model.RoleId.ToString()) != null) { this.ddlRoleList.SelectedValue = model.RoleId.ToString(); } txtDebt.Value = Utils.FilterEndOfTheZeroString(model.Arrears.ToString()); txtPhone.Value = model.ContactTel; txtFax.Value = model.ContactFax; txtMobile.Value = model.ContactMobile; txtQQ.Value = model.QQ; txtMSN.Value = model.MSN; txtEmail.Value = model.ContactEmail; txtIntroduction.Text = model.PeopProfile; txtRemark.Text = model.Remark; //chkState.Checked = model.IsEnable; txtUserName.Enabled = false; Pwd = model.Password; } else { ddlSex.Items[0].Selected = true; txtUserName.Enabled = true; //chkState.Checked = false; } }
/// <summary> /// 保存按钮点击事件执行方法 /// </summary> private string PageSave(string doType, string id) { string msg = string.Empty; //t为false为编辑,true时为新增 bool t = String.Equals(doType, "update", StringComparison.InvariantCultureIgnoreCase) && !string.IsNullOrEmpty(id) ? false : true; //国家 #region 表单取值 string country = Utils.GetFormValue(this.ddlCountry.UniqueID); //省份 string provice = Utils.GetFormValue(this.ddlProvice.UniqueID); //城市 string city = Utils.GetFormValue(this.ddlCity.UniqueID); //县区 string area = Utils.GetFormValue(this.ddlArea.UniqueID); //地址 string address = Utils.GetFormValue(this.txtaddress.UniqueID); //单位名称 string UnitName = Utils.GetFormValue(this.txtUnitName.UniqueID); //线路特色 string Character = Utils.GetFormValue(this.txtCharacter.UniqueID); //合同开始时间 string ContractStartDate = Utils.GetFormValue(this.txtContractDate_Start.UniqueID); //合同有到期时间 string ContractDate = Utils.GetFormValue(this.txtContractDate.UniqueID); //合同号 string ContractNum = Utils.GetFormValue(this.txtContractNum.UniqueID); //法人代表 string LegalName = Utils.GetFormValue(this.txtLegalName.UniqueID); //许可证号 string PermitNum = Utils.GetFormValue(this.txtPermitNum.UniqueID); //返佣政策 string Policy = Utils.GetFormValue(this.txtpolicy.UniqueID); //联系电话 string Tel = Utils.GetFormValue(this.txtTel.UniqueID); //合同附件(新) string[] visaUpload = Utils.GetFormValues(this.UploadControl1.ClientHideID); string[] oldVisaUpload = Utils.GetFormValues("hideFileInfo"); #endregion EyouSoft.Model.CrmStructure.MCrmLinkman m = new EyouSoft.Model.CrmStructure.MCrmLinkman(); MComUser mUser = new MComUser(); IList <EyouSoft.Model.CrmStructure.MCrmLinkman> list = UtilsCommons.GetDataList(); if (list != null && list.Count > 0) { mUser.ContactMobile = list[0].MobilePhone; mUser.ContactName = list[0].Name; mUser.ContactTel = list[0].Telephone; mUser.QQ = list[0].QQ; m.Post = list[0].Post; } if (string.IsNullOrEmpty(UnitName)) { msg = "{\"result\":\"0\",\"msg\":\"单位名称不能为空!\"}"; return(msg); } EyouSoft.Model.SourceStructure.MSourceTravel mTravel = new EyouSoft.Model.SourceStructure.MSourceTravel(); if (!string.IsNullOrEmpty(id)) { mTravel = new EyouSoft.BLL.SourceStructure.BSource().GetTravelServiceModel(id); } EyouSoft.Model.SourceStructure.MSource mModel = new EyouSoft.Model.SourceStructure.MSource(); mModel.Address = this.txtaddress.Text; mModel.CityId = Utils.GetInt(Utils.GetFormValue(this.ddlCity.UniqueID)); mModel.CountryId = Utils.GetInt(Utils.GetFormValue(this.ddlCountry.UniqueID)); mModel.CountyId = Utils.GetInt(Utils.GetFormValue(this.ddlArea.UniqueID)); mModel.ProvinceId = Utils.GetInt(Utils.GetFormValue(this.ddlProvice.UniqueID)); mModel.Name = Utils.GetFormValue(this.txtUnitName.UniqueID).Trim(); mModel.CompanyId = this.SiteUserInfo.CompanyId; mModel.OperatorId = this.SiteUserInfo.UserId; mModel.ContractCode = ContractNum; mModel.DeptId = this.SiteUserInfo.DeptId; mModel.ContractPeriodStart = String.IsNullOrEmpty(ContractStartDate) ? null : (DateTime?)DateTime.Parse(ContractStartDate); mModel.ContractPeriodEnd = String.IsNullOrEmpty(ContractDate) ? null : (DateTime?)DateTime.Parse(ContractDate); //签单 if (RadSign_no.Checked) { mModel.IsPermission = false; } else { mModel.IsPermission = true; } //推荐 if (RadRecommend_no.Checked) { mModel.IsRecommend = false; } else { mModel.IsRecommend = true; } //返佣 mModel.IsCommission = true; if (radno.Checked) { mModel.IsCommission = false; } //合同 if (Radio_hd_no.Checked) { mModel.IsSignContract = false; } else { mModel.IsSignContract = true; mModel.ContractCode = Utils.GetFormValue(this.txtContractNum.UniqueID); } mModel.LastModifierId = this.SiteUserInfo.Name; mModel.LastModifyTime = DateTime.Now; mModel.LicenseKey = PermitNum; mModel.UnitPolicy = Policy; mModel.Desc = Character; mModel.IssueTime = DateTime.Now; if (!String.IsNullOrEmpty(id)) { mModel.SourceId = id; } #region 合同附件 EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); if (oldVisaUpload.Length > 0) { for (int i = 0; i < oldVisaUpload.Length; i++) { visaModel.FilePath = oldVisaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.供应商合同附件; visaModel.Name = oldVisaUpload[i].Split('|')[0]; visaModel.Size = 0; } } if (visaUpload.Length > 0) { for (int i = 0; i < visaUpload.Length; i++) { if (visaUpload[i].Trim() != "") { if (visaUpload[i].Split('|').Length > 1) { visaModel.Downloads = 0; visaModel.FilePath = visaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.供应商合同附件; visaModel.Name = visaUpload[i].Split('|')[0]; visaModel.Size = 0; } } } } mModel.ContractAttach = visaModel; #endregion mUser.CompanyId = this.SiteUserInfo.CompanyId; //mUser.IsEnable = true; mUser.IssueTime = DateTime.Now; mUser.UserType = EyouSoft.Model.EnumType.ComStructure.UserType.供应商; MSourceTravelInfo Traveinfo = new MSourceTravelInfo(); Traveinfo.LegalRepresentative = LegalName; Traveinfo.Routes = Character; Traveinfo.Telephone = Tel; mTravel.SourceTravelModel = Traveinfo; //mTravel.UserModel = mUser; mTravel.SourceModel = mModel; mTravel.LinkManList = list; //mTravel.SourceTravelModel EyouSoft.BLL.SourceStructure.BSource bllsource = new EyouSoft.BLL.SourceStructure.BSource(); EyouSoft.BLL.ComStructure.BComUser blluser = new EyouSoft.BLL.ComStructure.BComUser(); int result = 0; if (t) {//新增 result = bllsource.AddTravelServiceModel(mTravel); if (result == -1) { msg = "{\"result\":\"0\",\"msg\":\"单位名称已存在!\"}"; return(msg); } } else { //编辑 result = bllsource.UpdateTravelServiceModel(mTravel); if (result == -1) { msg = "{\"result\":\"0\",\"msg\":\"单位名称已存在!\"}"; return(msg); } } string type = t ? "新增" : "修改"; if (result > 0) { msg = "{\"result\":\"1\",\"msg\":\"" + type + "成功!\"}"; return(msg); } else { msg = "{\"result\":\"0\",\"msg\":\"" + type + "失败!\"}"; return(msg); } }
/// <summary> /// 用户删除 /// </summary> protected void DelUser() { //string ids = Utils.GetQueryStringValue("ids").Trim(','); //bool result = new EyouSoft.BLL.ComStructure.BComUser().Delete(ids, SiteUserInfo.CompanyId); //if (result) //{ // Response.Write(UtilsCommons.AjaxReturnJson("1", "删除成功!")); //} //else //{ // Response.Write(UtilsCommons.AjaxReturnJson("0", "删除失败!")); //} /*string s = Utils.GetQueryStringValue("ids"); * if (string.IsNullOrEmpty(s)) RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:未选择任何要删除的用户信息!")); * * string[] items = s.Split(','); * if (items == null || items.Length == 0) RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:未选择任何要删除的用户信息!")); * * var bll = new EyouSoft.BLL.ComStructure.BComUser(); * * //f1:删除成功的用户数 f2:删除失败的用户数 * int f1 = 0; * int f2 = 0; * * foreach (var item in items) * { * if (string.IsNullOrEmpty(item)) continue; * * int bllRetCode = bll.Delete(SiteUserInfo.CompanyId, item); * * if (bllRetCode == 1) f1++; * else f2++; * } * * if (f1 + f2 == 0) RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:未选择任何要删除的用户信息!")); * if (f1 == 0) RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:选择的用户(" + (f1 + f2) + "个)信息不能删除!")); * if (f2 == 0) RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功:用户(" + f1 + "个)信息删除成功!")); * else RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功:" + f1 + "个用户信息删除成功," + f2 + "个用户信息不能删除!"));*/ string s = Utils.GetQueryStringValue("ids"); if (string.IsNullOrEmpty(s)) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:未选择任何要删除的用户信息!")); } int bllRetCode = new EyouSoft.BLL.ComStructure.BComUser().Delete(SiteUserInfo.CompanyId, s); if (bllRetCode == 1) { RCWE(UtilsCommons.AjaxReturnJson("1", "操作成功:用户信息已成功删除!")); } else if (bllRetCode == -99) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:用户信息不存在或已删除!")); } else if (bllRetCode == -98) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:默认的管理员账号不能删除!")); } else if (bllRetCode == -97) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:客户的责任销售不能删除!")); } else if (bllRetCode == -96) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:团队的销售员不能删除!")); } else if (bllRetCode == -95) { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:订单的销售员不能删除!")); } else { RCWE(UtilsCommons.AjaxReturnJson("0", "操作失败:未知异常,ERROR CODE:" + bllRetCode)); } }
/// <summary> /// 保存新的报价 /// </summary> /// <returns></returns> private string PageSave() { string msg = string.Empty; #region 获取表单 //线路区域编号 int areaID = Utils.GetInt(Utils.GetFormValue("sltArea")); //线路编号 string routeID = Utils.GetFormValue(this.hideRouteID.UniqueID); //线路名称 string routeName = Utils.GetFormValue(this.txt_RouteName.UniqueID); //天数 int days = Utils.GetInt(Utils.GetFormValue(this.txt_Days.UniqueID)); //客源地 国家 int countryID = Utils.GetInt(Utils.GetFormValue("sltCountry")); //客源地 省份 int provinceID = Utils.GetInt(Utils.GetFormValue("sltProvince")); //询价单位 编号 string buyCompanyID = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHBH); //询价单位 名称 string buyCompanyName = Utils.GetFormValue(this.UC_CustomerUnitSelect.ClientNameKHMC); //联系人 string contactName = Utils.GetFormValue(this.txt_Contact.UniqueID); //联系电话 string contactTel = Utils.GetFormValue(this.txt_ConTel.UniqueID); //销售员编号 string sellsID = Utils.GetFormValue(this.UC_SellsSelect.SellsIDClient); //销售员名称 string sellsName = Utils.GetFormValue(this.UC_SellsSelect.SellsNameClient); //报价员 取当前登录用户 EyouSoft.Model.TourStructure.MOperatorInfo operatorModel = new EyouSoft.Model.TourStructure.MOperatorInfo(); operatorModel.OperatorId = this.SiteUserInfo.UserId; operatorModel.Name = this.SiteUserInfo.Name; operatorModel.Phone = this.SiteUserInfo.Telephone; //成人数 int adultCount = Utils.GetInt(Utils.GetFormValue(this.txt_Adult.UniqueID)); //成人价格 decimal adultPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtAdultPrice.UniqueID)); //儿童数 int childCount = Utils.GetInt(Utils.GetFormValue(this.txt_Child.UniqueID)); //儿童价格 decimal childPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtChildPrice.UniqueID)); //其它价格 decimal otherPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtOtherPrice.UniqueID)); //行程特色 string planContent = Utils.EditInputText(Request.Form[this.txtPlanContent.UniqueID]); //价格备注 string quoteRemark = Utils.GetFormValue(this.txtQuoteRemark.UniqueID); //合计金额 decimal sumPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSumPrice.UniqueID)); //询价员 string toOper = Utils.GetFormValue("hideToOperID"); #region 未超限表单获取 //出团时间 DateTime successDateBegin = Utils.GetDateTime(Utils.GetFormValue(this.txtSuccessDateBegin.UniqueID), DateTime.Now); //出发交通 string successsStraffBegin = Utils.GetFormValue(this.txtSuccesssStraffBegin.UniqueID); //返回交通 string successsStraffEnd = Utils.GetFormValue(this.txtSuccesssStraffEnd.UniqueID); //集合方式 string successGather = Utils.GetFormValue(this.txtSuccessGather.UniqueID); //增加费用 decimal successAddPrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessAddPrice.UniqueID), 0); //增加费用备注 string successAddPriceRemark = Utils.GetFormValue(this.txtSuccessAddPriceRemark.UniqueID); //减少费用 decimal successReducePrice = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessReducePrice.UniqueID)); //减少费用备注 string successReducePriceRemark = Utils.GetFormValue(this.txtSuccessReducePriceRemark.UniqueID); //导游现收 decimal successGuideIncome = Utils.GetDecimal(Utils.GetFormValue(this.txtSuccessGuideIncome.UniqueID)); //订单备注 string successOrderRemark = Utils.GetFormValue(this.txtSuccessOrderRemark.UniqueID); //是否询价 bool isPlanerQuote = Utils.GetFormValue(this.cbxJdxj.UniqueID) == "on" ? true : false; //签证附件(新) string[] visaUpload = Utils.GetFormValues(this.UploadControl1.ClientHideID); string[] oldVisaUpload = Utils.GetFormValues("hideVisaFile"); //联系人部门编号 string contactDeptId = Utils.GetFormValue(this.hideContactDeptId.UniqueID); #endregion #endregion //1=保存,2=报价超限,3=报价未超,4=保存新报价 string saveType = Utils.GetQueryStringValue("saveType"); //如果是保存和保存新报价 则不做控制 if (saveType == "1" || saveType == "4") { #region 表单后台验证 if (areaID == 0) { msg = "请选择线路区域!"; } if (routeName == "") { msg += "<br />请输入线路名称!"; } if (days == 0) { msg += "<br />请输入天数!"; } if (buyCompanyID == "") { msg += "<br />请输入询价单位!"; } if (sellsID == "") { msg += "<br />请输入销售员!"; } if (adultCount == 0) { msg += "<br />请输入成人数!"; } if (adultPrice == 0) { msg += "<br />请输入成人价!"; } if (msg != "") { return(UtilsCommons.AjaxReturnJson("0", msg)); } #endregion } EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = new EyouSoft.Model.TourStructure.MTourQuoteInfo(); string act = Utils.GetQueryStringValue("act"); string qid = Utils.GetQueryStringValue("id"); model.AdultPrice = adultPrice; model.Adults = adultCount; model.AdvanceApp = null; model.AreaId = areaID; model.BuyCompanyID = buyCompanyID; model.BuyCompanyName = buyCompanyName; model.IsPlanerQuote = isPlanerQuote; model.ChildPrice = childPrice; model.Childs = childCount; model.CompanyId = SiteUserInfo.CompanyId; model.CompanyInfo = new EyouSoft.Model.TourStructure.MCompanyInfo() { CompanyId = buyCompanyID, CompanyName = buyCompanyName, Contact = contactName, Phone = contactTel }; model.Contact = contactName; string costCalculation = string.Empty; EyouSoft.Model.TourStructure.MTourService tourService = UtilsCommons.GetTourService(out costCalculation); model.TourService = tourService; model.CostCalculation = costCalculation; model.CountryId = countryID; model.Days = days; model.InquiryTime = DateTime.Now; model.IsPlanerQuote = false; model.MTourQuoteTourInfo = null; model.OperatorInfo = new EyouSoft.Model.TourStructure.MOperatorInfo(); model.OperatorInfo.OperatorId = this.SiteUserInfo.UserId; model.OperatorInfo.Name = this.SiteUserInfo.Name; model.OperatorInfo.Phone = this.SiteUserInfo.Telephone; model.OtherCost = otherPrice; if (isPlanerQuote) { model.PlanerId = toOper; } #region 签证附件 IList <EyouSoft.Model.ComStructure.MComAttach> visaList = null; if (visaUpload.Length > 0) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); for (int i = 0; i < visaUpload.Length; i++) { if (visaUpload[i].Trim() != "") { if (visaUpload[i].Split('|').Length > 1) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = 0; visaModel.FilePath = visaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料; visaModel.Name = visaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } } } if (oldVisaUpload.Length > 0) { if (visaList == null) { visaList = new List <EyouSoft.Model.ComStructure.MComAttach>(); } for (int i = 0; i < oldVisaUpload.Length; i++) { EyouSoft.Model.ComStructure.MComAttach visaModel = new EyouSoft.Model.ComStructure.MComAttach(); visaModel.Downloads = Utils.GetInt(oldVisaUpload[i].Split('|')[2]); visaModel.FilePath = oldVisaUpload[i].Split('|')[1]; visaModel.ItemType = EyouSoft.Model.EnumType.ComStructure.AttachItemType.报价签证资料; visaModel.Name = oldVisaUpload[i].Split('|')[0]; visaModel.Size = 0; visaList.Add(visaModel); } } model.VisaFileList = visaList; #endregion Dictionary <string, object> quoteType = UtilsCommons.GetServiceType(); bool IsTourOrSubentry = (bool)quoteType["IsTourOrSubentry"]; if (IsTourOrSubentry) { //整团 model.ServiceStandard = quoteType["Service"].ToString(); model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团; } else { //分项 model.TourTeamPrice = (IList <EyouSoft.Model.TourStructure.MTourTeamPrice>)quoteType["Service"]; model.OutQuoteType = EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项; } model.Phone = contactTel; model.ContactDepartId = contactDeptId; model.PlanFeature = planContent; model.ProvinceId = provinceID; model.QuotePlan = UtilsCommons.GetPlanList(); model.QuoteRemark = quoteRemark; model.QuoteState = EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理; model.QuoteType = (EyouSoft.Model.EnumType.TourStructure.ModuleType)(type - 1); model.RouteId = routeID; model.RouteName = routeName; model.TotalPrice = sumPrice; model.QuoteId = qid; //获得销售员信息实体 EyouSoft.Model.ComStructure.MComUser sellsModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(sellsID, SiteUserInfo.CompanyId); if (sellsModel != null) { model.SaleInfo = new EyouSoft.Model.TourStructure.MSaleInfo(); model.SaleInfo.SellerId = sellsID; model.SaleInfo.Name = sellsName; model.SaleInfo.Phone = sellsModel.ContactMobile; model.SaleInfo.DeptId = sellsModel.DeptId; } bool result = false; //新增,修改,复制 if (saveType == "1") { if (act == "add" || act == "copy") { model.ParentId = "0"; result = bll.AddTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "新增报价成功,正在跳转.."); } if (act == "update") { model.QuoteId = qid; model.UpdateTime = DateTime.Now; result = bll.UpdateTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "修改成功,正在跳转.."); } } //超限实体赋值 if (saveType == "2") { model.AdvanceApp = new EyouSoft.Model.TourStructure.MAdvanceApp(); model.AdvanceApp.Applier = this.SiteUserInfo.Name; model.AdvanceApp.ApplierId = this.SiteUserInfo.UserId; //model.AdvanceApp.DisburseAmount = applyPrice; //model.AdvanceApp.ApplyTime = applyDateTime; model.AdvanceApp.DeptId = this.SiteUserInfo.DeptId; //model.AdvanceApp.Remark = applyRemarks; model.MTourQuoteTourInfo = null; int r = bll.SuccessTourQuote(model); result = (r == 1 || r == 3) ? true : false; msg = UtilsCommons.AjaxReturnJson("1", "成功提交垫付申请,等待审核!"); } //未超限实体赋值 if (saveType == "3") { model.MTourQuoteTourInfo = new EyouSoft.Model.TourStructure.MTourQuoteTourInfo(); model.MTourQuoteTourInfo.AddCostRemark = successAddPriceRemark; model.MTourQuoteTourInfo.Gather = successGather; model.MTourQuoteTourInfo.GuideIncome = successGuideIncome; model.MTourQuoteTourInfo.LDate = successDateBegin; model.MTourQuoteTourInfo.LTraffic = successsStraffBegin; model.MTourQuoteTourInfo.OrderRemark = successOrderRemark; model.MTourQuoteTourInfo.ReduceCostRemark = successReducePriceRemark; model.MTourQuoteTourInfo.RTraffic = successsStraffEnd; model.MTourQuoteTourInfo.SaleAddCost = successAddPrice; model.MTourQuoteTourInfo.SaleReduceCost = successReducePrice; model.MTourQuoteTourInfo.SalerIncome = sumPrice - successGuideIncome; model.AdvanceApp = null; switch (type) { case 1: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.组团团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList(); break; case 2: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.地接团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelList(); break; case 3: model.MTourQuoteTourInfo.TourType = EyouSoft.Model.EnumType.TourStructure.TourType.出境团队; model.MTourQuoteTourInfo.Traveller = UtilsCommons.GetTravelListS(); break; } model.MTourQuoteTourInfo.TourStatus = EyouSoft.Model.EnumType.TourStructure.TourStatus.销售未派计划; model.UpdateTime = DateTime.Now; int successState = bll.SuccessTourQuote(model); switch (successState) { case 2: msg = UtilsCommons.AjaxReturnJson("1", "报价成功!"); result = true; break; case 4: msg = UtilsCommons.AjaxReturnJson("0", "操作失败!"); break; case 5: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员超限!,是否需要进行收款操作?"); result = true; break; case 6: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但客户单位超限!,是否需要进行收款操作?"); result = true; break; case 7: msg = UtilsCommons.AjaxReturnJson("2", "报价成功,但销售员和客户单位超限!,是否需要进行收款操作?"); result = true; break; default: msg = UtilsCommons.AjaxReturnJson("0", "操作失败!"); break; } if (successState == 1) { msg = UtilsCommons.AjaxReturnJson("0", "超限、垫付申请中,不能报价!"); } if (successState == 2) { msg = UtilsCommons.AjaxReturnJson("1", "报价成功!"); result = true; } } if (saveType == "4") { model.ParentId = Utils.GetFormValue(this.hideFristQuoteId.UniqueID); result = bll.AddNewTourQuote(model); msg = UtilsCommons.AjaxReturnJson("1", "新增新报价成功,正在跳转.."); } if (saveType == "5") { result = bll.CalcelTourQuote(qid, Utils.GetFormValue("txtCanelRemark")); msg = UtilsCommons.AjaxReturnJson("1", "取消成功,正在跳转.."); } if (!result) { msg = UtilsCommons.AjaxReturnJson("0", "操作失败,请稍后尝试!"); } return(msg); //model.CancelReason = ""; //model.IsLatest //model.OrderCode = ""; //model.OrderId = ""; //model.Planer //model.TimeCount //model.TotalPrice //model.TourPrice //model.TourQuoteNo //model.UpdateTime //model.VisaFileList }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { #region 用户控件初始化 this.UC_Journey.IsSuppliers = false; #endregion EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(id); if (model != null) { #region 绑定报价次数 //如果其它报价有非处理的,那么该报价不能操作 bool isCanDo = true; string isCanDoQuote = string.Empty; if (model.TourQuoteNo != null && model.TourQuoteNo.Count > 0) { this.rptChildPrice.DataSource = model.TourQuoteNo.OrderBy(p => p.Times); this.rptChildPrice.DataBind(); //如果多次报价中有一个是未处理的,那就记录下来 var cdModel = model.TourQuoteNo.FirstOrDefault(p => p.QuoteState != EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理); if (cdModel != null) { isCanDo = false; isCanDoQuote = cdModel.QuoteId; } //获得第一次报价的编号 var fristModel = model.TourQuoteNo.FirstOrDefault(p => p.Times == 1); if (fristModel != null) { this.hideFristQuoteId.Value = fristModel.QuoteId; } } else { this.phdPriceCount.Visible = false; this.hideFristQuoteId.Value = model.QuoteId; } #endregion this.hideOverrunState.Value = ((int)model.QuoteState).ToString(); BindAreaList(model.AreaId); this.CountryID = model.CountryId.ToString(); this.ProvinceID = model.ProvinceId.ToString(); this.hideRouteID.Value = model.RouteId; this.txt_RouteName.Text = model.RouteName; this.txt_Days.Text = model.Days.ToString(); this.UC_CustomerUnitSelect.CustomerUnitId = model.BuyCompanyID; this.UC_CustomerUnitSelect.CustomerUnitName = model.BuyCompanyName; this.txt_Contact.Text = model.Contact; this.txt_ConTel.Text = model.Phone; this.hideContactDeptId.Value = model.ContactDepartId; this.UC_SellsSelect.SellsID = model.SaleInfo.SellerId; this.UC_SellsSelect.SellsName = model.SaleInfo.Name; //this.cbxJdxj.Checked = model.IsPlanerQuote; this.lblQuote.Text = model.OperatorInfo.Name; this.txt_Adult.Text = model.Adults.ToString(); this.txt_Child.Text = model.Childs.ToString(); this.txtPlanContent.Text = model.PlanFeature; this.txtAdultPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.AdultPrice); this.txtChildPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.ChildPrice); this.txtOtherPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.OtherCost); this.txtSumPrice.Text = Utils.FilterEndOfTheZeroDecimal(model.TotalPrice); this.txtQuoteRemark.Text = model.QuoteRemark; if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.分项) { this.UC_ForeignQuote.IsTourOrSubentry = false; this.UC_ForeignQuote.StandardTourList = model.TourTeamPrice; } else { this.UC_ForeignQuote.IsTourOrSubentry = true; this.UC_ForeignQuote.GroupService = model.ServiceStandard; } this.UC_Journey.SetPlanList = model.QuotePlan; UC_CostAccounting.CostCalculation = model.CostCalculation; UC_CostAccounting.NoNeedItem = model.TourService.NoNeedItem; UC_CostAccounting.ShoppingItem = model.TourService.ShoppingItem; UC_CostAccounting.ChildServiceItem = model.TourService.ChildServiceItem; UC_CostAccounting.OwnExpense = model.TourService.OwnExpense; UC_CostAccounting.NeedAttention = model.TourService.NeedAttention; UC_CostAccounting.WarmRemind = model.TourService.WarmRemind; UC_CostAccounting.InsiderInfor = model.TourService.InsiderInfor; //签证附件 if (model.VisaFileList != null && model.VisaFileList.Count > 0) { string visaStr = string.Empty; for (int i = 0; i < model.VisaFileList.Count; i++) { visaStr += "<span class='upload_filename'> <a href='" + model.VisaFileList[i].FilePath + "' target='_blank'>" + model.VisaFileList[i].Name + "</a><a href='javascript:void(0);' onclick='AddPrice.RemoveVisaFile(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideVisaFile' value='" + model.VisaFileList[i].Name + "|" + model.VisaFileList[i].FilePath + "|" + model.VisaFileList[i].Downloads.ToString() + "'></span>"; } this.lblVisaFiles.Text = visaStr; } if (model.PlanerId != "") { if (model.Planer == "") { EyouSoft.Model.ComStructure.MComUser planerModel = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.PlanerId, SiteUserInfo.CompanyId); if (planerModel != null) { model.Planer = planerModel.ContactName; } } this.lblToOper.Text = "<span class='upload_filename'> 计调员:" + model.Planer + "<a href='javascript:void(0);' onclick='AddPrice.RemoveOper(this);return false;'> <img style='vertical-align:middle' src='/images/cha.gif'></a><input type='hidden' name='hideToOperID' value='" + model.PlanerId + "'></span>"; } this.phdSave.Visible = false; this.phdQuote.Visible = false; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; //如果其它报价有非处理的,那么该报价不能操作 if (isCanDo || (isCanDo == false && isCanDoQuote == model.QuoteId)) { switch (model.QuoteState) { case EyouSoft.Model.EnumType.TourStructure.QuoteState.报价成功: case EyouSoft.Model.EnumType.TourStructure.QuoteState.取消报价: break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.垫付申请审核: this.litMsg.Text = "<div class='tishi_info'>该报价垫付申请审核中,无法操作!</div>"; //this.phdSave.Visible = true; //this.phdQuote.Visible = true; //this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.审核成功: this.phdQuote.Visible = true; this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.审核失败: this.phdCanel.Visible = true; break; case EyouSoft.Model.EnumType.TourStructure.QuoteState.未处理: this.phdSave.Visible = true; this.phdQuote.Visible = true; this.phdNewAdd.Visible = true; this.phdCanel.Visible = true; break; } } if (act == "copy") { this.phdPriceCount.Visible = false; this.phdSave.Visible = true; this.phdQuote.Visible = true; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; this.hideOverrunState.Value = "0"; this.UC_SellsSelect.SellsID = SiteUserInfo.UserId; this.UC_SellsSelect.SellsName = SiteUserInfo.Name; this.lblQuote.Text = SiteUserInfo.Name; this.litMsg.Visible = false; } //权限控制 BtnPowerControl(); //是否可以操作该数据 if (!SiteUserInfo.IsHandleElse && act != "copy") { if ((model.OperatorInfo != null && model.OperatorInfo.OperatorId != SiteUserInfo.UserId) || act == "forOper") { this.phdSave.Visible = false; this.phdQuote.Visible = false; this.phdNewAdd.Visible = false; this.phdCanel.Visible = false; } } } else { Utils.ResponseGoBack(); } }
private void PageInit(string tourid, string quoteid, string type) { this.txtsourcename.Text = SiteUserInfo.CompanyName; /*this.txtname.Text = SiteUserInfo.Name; * this.txttel.Text = SiteUserInfo.Telephone; * this.txtfax.Text = SiteUserInfo.Fax;*/ //派团计划实体 if (!string.IsNullOrEmpty(tourid)) { EyouSoft.Model.TourStructure.MTourTeamInfo model = null; EyouSoft.BLL.TourStructure.BTour bll = new EyouSoft.BLL.TourStructure.BTour(); EyouSoft.Model.EnumType.TourStructure.TourType tourtype = bll.GetTourType(tourid); switch (tourtype) { case EyouSoft.Model.EnumType.TourStructure.TourType.出境散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.地接散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼: case EyouSoft.Model.EnumType.TourStructure.TourType.组团散拼短线: //跳转到散拼 EyouSoft.BLL.ComStructure.BComSetting bcom = new EyouSoft.BLL.ComStructure.BComSetting(); Response.Redirect(bcom.GetPrintUri(this.SiteUserInfo.CompanyId, EyouSoft.Model.EnumType.ComStructure.PrintTemplateType.散拼行程单) + "?tourId=" + tourid); break; case EyouSoft.Model.EnumType.TourStructure.TourType.单项服务: this.TAll.Visible = false; this.TChildren.Visible = false; this.TNeedAttention.Visible = false; this.TNoService.Visible = false; this.TOption.Visible = false; this.TPlanFeature.Visible = false; this.TSelfProject.Visible = false; this.TService.Visible = false; this.TShopping.Visible = false; this.TTourPrice.Visible = false; this.TWarmRemind.Visible = false; return; } if (type == "") { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetTourInfo(tourid); } else { model = (EyouSoft.Model.TourStructure.MTourTeamInfo)bll.GetOldTourInfo(tourid, this.SiteUserInfo.CompanyId); } if (model != null) { this.lbTourCode.Text = model.TourCode; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.lbRouteName.Text = model.RouteName; if (model.CompanyInfo != null) { this.txtunitname.Text = model.CompanyInfo.CompanyName; this.txtunitContactname.Text = model.CompanyInfo.Contact; this.txtunittel.Text = model.CompanyInfo.Phone; } #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.TourPlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } string riQi = "第" + Plan.Days + "天 "; if (model.LDate.HasValue) { riQi += model.LDate.Value.AddDays(Plan.Days - 1).ToString("yyyy-MM-dd"); } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>{0} {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", riQi, Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = model.PlanFeature; } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 /*if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) * { * this.TService.Visible = false; * } * else * { * this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); * }*/ TService.Visible = false; #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; if (model.TourService != null) { this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td align='center' width='13%'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.SumPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } else//团队报价实体 { EyouSoft.BLL.TourStructure.BQuote bll = new EyouSoft.BLL.TourStructure.BQuote(); EyouSoft.Model.TourStructure.MTourQuoteInfo model = bll.GetQuoteInfo(quoteid); if (model != null) { this.lbRouteName.Text = model.RouteName; this.lbPeoNum.Text = model.Adults.ToString() + "<sup>+" + model.Childs.ToString() + "</sup>"; this.lbAdultsNum.Text = model.Adults.ToString() + "人"; this.lbChildsNum.Text = model.Childs.ToString() + "人"; this.txtunitname.Text = model.BuyCompanyName; this.txtunitContactname.Text = model.Contact; this.txtunittel.Text = model.Phone; this.lbRouteName.Text = model.RouteName; #region 行程 IList <EyouSoft.Model.TourStructure.MPlanBaseInfo> planinfo = model.QuotePlan.OrderBy(m => m.Days).ToList(); if (planinfo != null && planinfo.Count > 0) { StringBuilder strAllDateInfo = new StringBuilder(); string Dinner = string.Empty;//包餐(早、中、晚) foreach (EyouSoft.Model.TourStructure.MPlanBaseInfo Plan in planinfo) { if (Plan.Breakfast) { Dinner += "早、"; } if (Plan.Lunch) { Dinner += "中、"; } if (Plan.Supper) { Dinner += "晚、"; } strAllDateInfo.AppendFormat("<table width='696' border='0' align='center' cellpadding='0' cellspacing='0' class='borderline_2'><tr><td width='35%' class='small_title'><b class='font16'>第{0}天 {6}</b></td><td width='15%' class='small_title'><b class='font14'>交通:{1}</b></td><td width='20%' class='small_title'><b class='font14'>餐:{2}</b></td><td width='30%' class='small_title'><b class='font14'>住宿:{3}</b></td></tr></table><table width='696' border='0' align='center' cellpadding='0' cellspacing='0' style='margin-top:0px' class='list_2'><tr><td class='td_text' style='border-top:none;' width='{7}'>{4}</td>{5}</tr></table>", Plan.Days.ToString(), Plan.Traffic, Dinner, Plan.Hotel, Plan.Content, string.IsNullOrEmpty(Plan.FilePath) ? "" : "<td style='border-top:none;'><img src='http://" + Request.Url.Authority + Plan.FilePath + "' width='202' height='163' /></td>", Plan.Section, string.IsNullOrEmpty(Plan.FilePath) ? "100%" : "480px"); Dinner = string.Empty; } this.lbtourplan.Text = strAllDateInfo.ToString(); } #endregion #region 线路特色 if (string.IsNullOrEmpty(model.PlanFeature)) { this.TPlanFeature.Visible = false; } else { this.lbPlanFeature.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.PlanFeature); } #endregion #region 计划服务 if (model.TourService != null) { #region 务标准 if (string.IsNullOrEmpty(model.TourService.ServiceStandard)) { this.TService.Visible = false; } else { this.lbService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ServiceStandard); } #endregion #region 务不含 if (string.IsNullOrEmpty(model.TourService.NoNeedItem)) { this.TNoService.Visible = false; } else { this.lbnoService.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NoNeedItem); } #endregion #region 购物安排 if (string.IsNullOrEmpty(model.TourService.ShoppingItem)) { this.TShopping.Visible = false; } else { this.lbshopping.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ShoppingItem); } #endregion #region 儿童安排 if (string.IsNullOrEmpty(model.TourService.ChildServiceItem)) { this.TChildren.Visible = false; } else { this.lbchildren.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.ChildServiceItem); } #endregion #region 自费项目 if (string.IsNullOrEmpty(model.TourService.OwnExpense)) { this.TSelfProject.Visible = false; } else { this.lbselfproject.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.OwnExpense); } #endregion #region 温馨提醒 if (string.IsNullOrEmpty(model.TourService.WarmRemind)) { this.TWarmRemind.Visible = false; } else { this.lbwarmremind.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.WarmRemind); } #endregion #region 注意事项 if (string.IsNullOrEmpty(model.TourService.NeedAttention)) { this.TNeedAttention.Visible = false; } else { this.lbneedattention.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.TourService.NeedAttention); } #endregion } else { this.TPlanService.Visible = false; } #endregion #region 务标准 if (model.OutQuoteType == EyouSoft.Model.EnumType.TourStructure.TourQuoteType.整团) { this.TOption.Visible = false; this.lballservice.Text = EyouSoft.Common.Function.StringValidate.TextToHtml(model.ServiceStandard); } else { this.TAll.Visible = false; IList <MTourTeamPrice> TeamPrice = model.TourTeamPrice; StringBuilder strTeamPrice = new StringBuilder(); foreach (MTourTeamPrice teamprice in TeamPrice) { if (!string.IsNullOrEmpty(teamprice.ServiceType.ToString())) { strTeamPrice.AppendFormat("<tr><td width='9%' align='left'><b class='font14'>{0}</b></td><td align='left'>{1}</td><td width='13%' align='center'>{2}</td>", teamprice.ServiceType.ToString(), EyouSoft.Common.Function.StringValidate.TextToHtml(teamprice.ServiceStandard), EyouSoft.Common.UtilsCommons.GetMoneyString(teamprice.Quote, ProviderToMoney) + "/" + teamprice.Unit.ToString()); } } this.lboptionservice.Text = strTeamPrice.ToString(); } #endregion #region 团队报价 this.lbChildPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.ChildPrice, ProviderToMoney) + "/人"; this.lbAdultPrice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.AdultPrice, ProviderToMoney) + "/人"; this.lbotherprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.OtherCost, ProviderToMoney) + "/团"; this.lbtotleprice.Text = EyouSoft.Common.UtilsCommons.GetMoneyString(model.TotalPrice, ProviderToMoney); this.lbremark.Text = model.QuoteRemark; #endregion #region 销售员 if (model.SaleInfo != null) { var xiaoShouYuanInfo = new EyouSoft.BLL.ComStructure.BComUser().GetModel(model.SaleInfo.SellerId, SiteUserInfo.CompanyId); if (xiaoShouYuanInfo != null) { this.txtname.Text = xiaoShouYuanInfo.ContactName; this.txttel.Text = xiaoShouYuanInfo.ContactTel; this.txtfax.Text = xiaoShouYuanInfo.ContactFax; } } #endregion } } }