/// <summary> /// 报价标准 /// </summary> public string BindPriceList() { StringBuilder sb = new StringBuilder(); EyouSoft.BLL.CompanyStructure.CompanyPriceStand price = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); IList <EyouSoft.Model.CompanyStructure.CompanyPriceStand> pricelist = new List <EyouSoft.Model.CompanyStructure.CompanyPriceStand>(); pricelist = price.GetPriceStandByCompanyId(CurrentUserCompanyID); foreach (var v in pricelist) { sb.Append("<option value=\"" + v.Id.ToString() + "|" + v.PriceStandName + "\">" + v.PriceStandName + "</option>"); } pricelist = null; return(sb.ToString()); }
/// <summary> /// 报价标准 /// </summary> public void BindPriceList() { EyouSoft.BLL.CompanyStructure.CompanyPriceStand price = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); int kkk = 0; IList <EyouSoft.Model.CompanyStructure.CompanyPriceStand> pricelist = new List <EyouSoft.Model.CompanyStructure.CompanyPriceStand>(); pricelist = price.GetList(100, 1, ref kkk, CurrentUserCompanyID); this.ddl_price.Items.Clear(); this.ddl_price.Items.Add(new ListItem("请选择报价标准", "")); if (pricelist.Count > 0) { for (int i = 0; i < pricelist.Count; i++) { ListItem item = new ListItem(); item.Value = pricelist[i].Id + "|" + pricelist[i].PriceStandName; item.Text = pricelist[i].PriceStandName; this.ddl_price.Items.Add(item); } } }
protected void Page_Load(object sender, EventArgs e) { if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_基础设置_客户等级栏目, true); return; } int custId = Utils.GetInt(Utils.GetQueryStringValue("custId"));//客户等级Id pageIndex = Utils.GetInt(Utils.GetQueryStringValue("Page"), 1); itemIndex2 = (pageIndex - 1) * pageSize + 1; EyouSoft.BLL.CompanyStructure.CompanyCustomStand customStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand();//初始化custbll //报价Id不为空执行删除操作 if (custId != 0) { if (Utils.GetQueryStringValue("method") == "ispublish") //验证该区域是否有线路存在 { EyouSoft.BLL.CompanyStructure.CompanyPriceStand priceStandBll = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); //初始化报价bll Utils.ResponseMeg(priceStandBll.IsUsed(custId, CurrentUserCompanyID, 0), ""); return; } bool result = customStandBll.Delete(custId); MessageBox.ShowAndRedirect(this, result ? "删除成功" : "删除失败", "/systemset/basicinfo/CustomerLevel.aspx"); return; } //绑定客户等级列表 IList <EyouSoft.Model.CompanyStructure.CustomStand> list = customStandBll.GetList(pageSize, pageIndex, ref recordCount, CurrentUserCompanyID); if (list != null && list.Count > 0) { rptCustLevel.DataSource = list; rptCustLevel.DataBind(); BindExportPage(); } else { rptCustLevel.EmptyText = "<tr><td colspan='6' align='center'>对不起,暂无客户等级信息!</td></tr>"; this.ExportPageInfo1.Visible = false; } }
protected bool IsSystem; //系统默认 protected void Page_Load(object sender, EventArgs e) { if (!CheckGrant(global::Common.Enum.TravelPermission.系统设置_基础设置_报价标准栏目)) { Utils.ResponseNoPermit(global::Common.Enum.TravelPermission.系统设置_基础设置_报价标准栏目, false); return; } priceStand = Utils.GetFormValue("txtPrcStand"); //获取报价 int pId = Utils.GetInt(Utils.GetQueryStringValue("priId")); //报价Id string method = Utils.GetFormValue("hidMethod"); //获取当前操作(保存/继续) string showMess = "数据保存成功!"; //提示消息 EyouSoft.Model.CompanyStructure.CompanyPriceStand priceModel = null; EyouSoft.BLL.CompanyStructure.CompanyPriceStand priceStandBll = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand();//初始化报价bll //无操作方式则为获取数据 if (method == "") { #region 初始化加载数据 if (pId != 0) { priceModel = priceStandBll.GetModel(pId); if (priceModel != null) { priceStand = priceModel.PriceStandName; IsSystem = priceModel.IsSystem; } return; } #endregion } else { #region 保存 if (priceStand == "") { MessageBox.Show(this, "报价标准不为空!"); return; } bool result = false; priceModel = new EyouSoft.Model.CompanyStructure.CompanyPriceStand(); priceModel.CompanyId = CurrentUserCompanyID; priceModel.OperatorId = 0; priceModel.IssueTime = DateTime.Now; priceModel.PriceStandName = priceStand; if (pId != 0) { priceModel.Id = pId; result = priceStandBll.Update(priceModel);//修改数据 } else { result = priceStandBll.Add(priceModel);//添加数据 } if (!result) { showMess = "数据保存失败"; } //继续添加则刷新页面,否则关闭当前窗口 if (method == "continue") { MessageBox.ShowAndRedirect(this, showMess, "PriceStandEdit.aspx"); } else { MessageBox.ResponseScript(this, string.Format(";alert('{0}');window.parent.location='/systemset/basicinfo/PriceStand.aspx';window.parent.Boxy.getIframeDialog('{1}').hide();", showMess, Utils.GetQueryStringValue("iframeId"))); } #endregion } }
//销售列表详细数据初始化 private void onInit() { if (OrderID != "") { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.TourOrder TourOrderModel = TourOrderBll.GetOrderModel(CurrentUserCompanyID, OrderID); System.Text.StringBuilder stringPrice = new System.Text.StringBuilder(); if (TourOrderModel != null) { #region 结算价绑定 //只有散拼有报价标准,单项服务与团队计划都没有报价标准 if (TourOrderModel.TourClassId == EyouSoft.Model.EnumType.TourStructure.TourType.散拼计划) { EyouSoft.BLL.CompanyStructure.CompanyPriceStand CompanyPriceStandBll = new EyouSoft.BLL.CompanyStructure.CompanyPriceStand(); EyouSoft.BLL.CompanyStructure.CompanyCustomStand CompanyCustomStandBll = new EyouSoft.BLL.CompanyStructure.CompanyCustomStand(); EyouSoft.BLL.TourStructure.Tour tourBLl = new EyouSoft.BLL.TourStructure.Tour(); PriceList = tourBLl.GetPriceStandards(TourOrderModel.TourId); CompanyPriceStandList = CompanyPriceStandBll.GetPriceStandByCompanyId(SiteUserInfo.CompanyID); CustomStandList = CompanyCustomStandBll.GetCustomStandByCompanyId(SiteUserInfo.CompanyID); for (int j = 0; j < CompanyPriceStandList.Count; j++) { if (j == 0) { stringPrice.Append("<tr><td align=\"center\">报价标准</td>"); for (int i = 0; i < CustomStandList.Count; i++) { EyouSoft.Model.CompanyStructure.CustomStand CustomStand = CustomStandList[i]; stringPrice.AppendFormat("<td><div style=\"text-align: center;\">{0}</div></td>", CustomStand.CustomStandName); } stringPrice.Append("</tr>"); } EyouSoft.Model.CompanyStructure.CompanyPriceStand CompanyPriceStand = CompanyPriceStandList[j]; stringPrice.Append("<tr>"); stringPrice.AppendFormat("<td><div class=\"divPrice\" val=\"{0}\">", CompanyPriceStand.Id); stringPrice.AppendFormat("<div style=\"text-align: center;\">{0}</div></td>", CompanyPriceStand.PriceStandName); for (int i = 0; i < CustomStandList.Count; i++) { EyouSoft.Model.CompanyStructure.CustomStand CustomStand = CustomStandList[i]; stringPrice.Append("<td>"); stringPrice.AppendFormat("<input type=\"radio\" name=\"radio\" id=\"radio{0}\" value=\"{0}\" />", CustomStand.Id); stringPrice.AppendFormat("成人价:<span name=\"sp_cr_price\">{0}</span>", FilterEndOfTheZeroDecimal(GetPriceBy(CompanyPriceStand.Id, CustomStand.Id, true))); stringPrice.AppendFormat("儿童价:<span name=\"sp_et_price\">{0}</span>", FilterEndOfTheZeroDecimal(GetPriceBy(CompanyPriceStand.Id, CustomStand.Id, false))); } stringPrice.Append("</td></tr>"); } price = stringPrice.ToString(); } //如果该订单是团队计划订单,则不显示成人数与儿童数,显示总人数 else if (TourOrderModel.TourClassId == EyouSoft.Model.EnumType.TourStructure.TourType.团队计划) { this.SanPingPersonNum.Visible = false; this.lblTeamPersonNum.Visible = true; this.lblTeamPersonNum.Enabled = false; } PriceStandId = TourOrderModel.PriceStandId.ToString(); CustomerLevId = TourOrderModel.CustomerLevId.ToString(); #endregion #region 订单基本数据 //线路名称 this.lblLineName.Text = TourOrderModel.RouteName; //出团日期 this.lblChuTuanDate.Text = TourOrderModel.LeaveDate.ToString("yyyy-MM-dd"); //当前空位 this.lblCurFreePosi.Text = TourOrderModel.RemainNum.ToString(); //出发交通 this.lblChuFanTra.Text = TourOrderModel.LeaveTraffic; //返回交通 this.lblBackTra.Text = TourOrderModel.ReturnTraffic; //联系人 this.lblContactName.Text = TourOrderModel.ContactName; //电话 this.lblContactPhone.Text = TourOrderModel.ContactTel; //手机 this.lblContactMobile.Text = TourOrderModel.ContactMobile; //传真 this.lblContactFax.Text = TourOrderModel.ContactFax; //特殊要求说明 this.txtSpecialRe.Text = TourOrderModel.SpecialContent; //操作留言 this.txtOperMes.Text = TourOrderModel.OperatorContent; //人数(成人) this.txtDdultCount.Text = TourOrderModel.AdultNumber.ToString(); //人数(儿童) this.txtChildCount.Text = TourOrderModel.ChildNumber.ToString(); //总金额 this.txtTotalMoney.Text = Utils.FilterEndOfTheZeroString(TourOrderModel.SumPrice.ToString()); //总人数 this.lblTeamPersonNum.Text = TourOrderModel.PeopleNumber.ToString(); if (!string.IsNullOrEmpty(TourOrderModel.CustomerFilePath)) { this.hykCusFile.NavigateUrl = TourOrderModel.CustomerFilePath; this.hykCusFile.Visible = true; } ltrBuyerTourCode.Text = TourOrderModel.BuyerTourCode; #endregion #region 订单游客数据 System.Collections.Generic.IList <EyouSoft.Model.TourStructure.TourOrderCustomer> curList = TourOrderModel.CustomerList; System.Text.StringBuilder stringBuilder = new System.Text.StringBuilder(); if (curList != null && curList.Count > 0) { for (int i = 0; i < curList.Count; i++) { if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.成人) { stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "adult"); } else if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童) { stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "child"); } else { stringBuilder.AppendFormat("<tr itemtype=\"{0}\">", "other"); } stringBuilder.AppendFormat("<td style=\"width: 5%\" bgcolor=\"#e3f1fc\" index=\"{0}\" align=\"center\">{0}</td><td height=\"25\" bgcolor=\"#e3f1fc\" align=\"center\">", i + 1); stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput\" id=\"cusName\" name=\"cusName\" value=\"{0}\" /></td>", curList[i].VisitorName); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">"); #region 游客类型 if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.成人) { stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">"); stringBuilder.Append("<option value=\"0\">请选择</option>"); stringBuilder.Append("<option value=\"1\" selected=\"selected\">成人</option>"); stringBuilder.Append("<option value=\"2\">儿童</option>"); stringBuilder.Append(" </select>"); } //儿童 else if (curList[i].VisitorType == EyouSoft.Model.EnumType.TourStructure.VisitorType.儿童) { stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">"); stringBuilder.Append("<option value=\"0\">请选择</option>"); stringBuilder.Append("<option value=\"1\" >成人</option>"); stringBuilder.Append("<option value=\"2\" selected=\"selected\">儿童</option>"); stringBuilder.Append(" </select>"); } //其它 else { stringBuilder.Append("<select disabled=\"disabled\" id=\"cusType\" name=\"cusType\">"); stringBuilder.Append("<option value=\"0\" selected=\"selected\">请选择</option>"); stringBuilder.Append("<option value=\"1\" >成人</option>"); stringBuilder.Append("<option value=\"2\">儿童</option>"); stringBuilder.Append(" </select>"); } #endregion stringBuilder.Append("</td>"); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">"); #region 游客证件类型 switch (curList[i].CradType) { case EyouSoft.Model.EnumType.TourStructure.CradType.身份证: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\" selected=\"selected\">身份证</option>"); stringBuilder.Append("<option value=\"2\">护照</option>"); stringBuilder.Append("<option value=\"3\">军官证</option>"); stringBuilder.Append("<option value=\"4\">台胞证</option>"); stringBuilder.Append("<option value=\"5\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } case EyouSoft.Model.EnumType.TourStructure.CradType.护照: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\">身份证</option>"); stringBuilder.Append("<option value=\"2\" selected=\"selected\">护照</option>"); stringBuilder.Append("<option value=\"3\">军官证</option>"); stringBuilder.Append("<option value=\"4\">台胞证</option>"); stringBuilder.Append("<option value=\"5\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } case EyouSoft.Model.EnumType.TourStructure.CradType.军官证: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\">身份证</option>"); stringBuilder.Append("<option value=\"2\">护照</option>"); stringBuilder.Append("<option value=\"3\" selected=\"selected\">军官证</option>"); stringBuilder.Append("<option value=\"4\">台胞证</option>"); stringBuilder.Append("<option value=\"5\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } case EyouSoft.Model.EnumType.TourStructure.CradType.台胞证: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\">身份证</option>"); stringBuilder.Append("<option value=\"2\">护照</option>"); stringBuilder.Append("<option value=\"3\">军官证</option>"); stringBuilder.Append("<option value=\"4\" selected=\"selected\">台胞证</option>"); stringBuilder.Append("<option value=\"5\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } case EyouSoft.Model.EnumType.TourStructure.CradType.港澳通行证: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\">身份证</option>"); stringBuilder.Append("<option value=\"2\">护照</option>"); stringBuilder.Append("<option value=\"3\">军官证</option>"); stringBuilder.Append("<option value=\"4\">台胞证</option>"); stringBuilder.Append("<option value=\"5\" selected=\"selected\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } default: { stringBuilder.Append("<select id=\"cusCardType\" name=\"cusCardType\">"); stringBuilder.Append("<option value=\"0\" selected=\"selected\">请选择证件</option>"); stringBuilder.Append("<option value=\"1\" >身份证</option>"); stringBuilder.Append("<option value=\"2\">护照</option>"); stringBuilder.Append("<option value=\"3\">军官证</option>"); stringBuilder.Append("<option value=\"4\">台胞证</option>"); stringBuilder.Append("<option value=\"5\">港澳通行证</option>"); stringBuilder.Append("</select>"); break; } } #endregion stringBuilder.Append("</td>"); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">"); stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput searchinput02\" id=\"cusCardNo\" onblur='getSex(this)' name=\"cusCardNo\" value=\"{0}\">", curList[i].CradNumber); stringBuilder.Append("</td>"); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">"); #region 游客性别 switch (curList[i].Sex) { case EyouSoft.Model.EnumType.CompanyStructure.Sex.男: { stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">"); stringBuilder.Append("<option value=\"0\">请选择</option>"); stringBuilder.Append("<option value=\"1\" selected=\"selected\">男</option>"); stringBuilder.Append("<option value=\"2\">女</option>"); stringBuilder.Append("</select>"); break; } case EyouSoft.Model.EnumType.CompanyStructure.Sex.女: { stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">"); stringBuilder.Append("<option value=\"0\">请选择</option>"); stringBuilder.Append("<option value=\"1\">男</option>"); stringBuilder.Append("<option value=\"2\" selected=\"selected\">女</option>"); stringBuilder.Append("</select>"); break; } default: { stringBuilder.Append("<select id=\"cusSex\" class='ddlSex' name=\"cusSex\">"); stringBuilder.Append("<option value=\"0\" selected=\"selected\">请选择</option>"); stringBuilder.Append("<option value=\"1\">男</option>"); stringBuilder.Append("<option value=\"2\">女</option>"); break; } } #endregion stringBuilder.Append("</td>"); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\">"); stringBuilder.AppendFormat("<input type=\"text\" class=\"searchinput\" id=\"cusPhone\" name=\"cusPhone\" value=\"{0}\">", curList[i].ContactTel); stringBuilder.Append("</td>"); stringBuilder.Append("<td bgcolor=\"#e3f1fc\" align=\"center\" width=\"6%\">"); if (curList[i].SpecialServiceInfo != null) { string str = string.Format("txtItem={0}&txtServiceContent={1}&txtCost={2}&ddlOperate={3}", curList[i].SpecialServiceInfo.ProjectName, curList[i].SpecialServiceInfo.ServiceDetail, curList[i].SpecialServiceInfo.Fee, (curList[i].SpecialServiceInfo.IsAdd.ToString() == "true" ? "1" : "0")); stringBuilder.AppendFormat("<input id=\"spe{0}\" type=\"hidden\" name=\"specive\" value=\"{1}\" />", curList[i].ID, str); } else { stringBuilder.AppendFormat("<input id=\"spe{0}\" type=\"hidden\" name=\"specive\" value=\"\" />", curList[i].ID); } stringBuilder.AppendFormat("<a sign=\"speService\" href=\"javascript:void(0)\" onclick=\"OrderEdit.OpenSpecive('spe{0}',$(this))\">特服</a></td>", curList[i].ID); stringBuilder.Append("</tr>"); } } cusHtml = stringBuilder.ToString(); #endregion if (TourOrderModel.BuyerContactId > 0) { var buyerContactInfo = new EyouSoft.BLL.CompanyStructure.Customer().GetCustomerContactModel(TourOrderModel.BuyerContactId); if (buyerContactInfo != null) { this.ltrBuyerContact.Text = string.Format("姓名:{0} 电话:{1} 手机:{2} QQ:{3}", buyerContactInfo.Name , buyerContactInfo.Tel , buyerContactInfo.Mobile , buyerContactInfo.qq); buyerContactInfo = null; } } } TourOrderBll = null; TourOrderModel = null; } }