protected void BindDropDownList() { //类型(推荐,特价) this.dropRecommendType.DataSource = EnumObj.GetList(typeof(RecommendType)); this.dropRecommendType.DataTextField = "Text"; this.dropRecommendType.DataValueField = "Value"; this.dropRecommendType.DataBind(); this.dropRecommendType.Items.Insert(0, new ListItem("请选择", "-1")); //国内国际周边 foreach (EnumObj item in EnumObj.GetList(typeof(AreaType))) { if (Utils.GetInt(item.Value) < 3) { this.dropLine.Items.Add(new ListItem(item.Text, item.Value)); } } this.dropLine.Items.Insert(0, new ListItem("请选择", "-1")); //专线 this.dropLine1.Items.Insert(0, new ListItem("请选择", "0")); //线路类型 IList <EnumObj> searchLineList = EnumObj.GetList(typeof(AreaType)).Where(p => p.Value != "3").ToList(); this.DropSearchLine.DataSource = searchLineList; this.DropSearchLine.DataTextField = "Text"; this.DropSearchLine.DataValueField = "Value"; this.DropSearchLine.DataBind(); this.DropSearchLine.Items.Insert(0, new ListItem("请选择", "-1")); }
protected void PageInit() { IList <EnumObj> list = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.RefundType)); if (list != null && list.Count > 0) { this.ddl_PayType.DataSource = list; this.ddl_PayType.DataTextField = "Text"; this.ddl_PayType.DataValueField = "Value"; this.ddl_PayType.DataBind(); } orderId = Utils.GetQueryStringValue("id"); if (!string.IsNullOrEmpty(orderId)) { EyouSoft.BLL.TourStructure.TourOrder TourOrderBll = new EyouSoft.BLL.TourStructure.TourOrder(); EyouSoft.Model.TourStructure.TourOrder TourOrderModel = TourOrderBll.GetOrderModel(CurrentUserCompanyID, orderId); if (TourOrderModel != null) { pepoleNum = TourOrderModel.AdultNumber.ToString(); pepoleNum2 = TourOrderModel.ChildNumber.ToString(); hidRouteName.Value = TourOrderModel.RouteName; hidOrderId.Value = TourOrderModel.ID; } EyouSoft.BLL.PlanStruture.PlaneTicket BLL = new EyouSoft.BLL.PlanStruture.PlaneTicket(); EyouSoft.Model.PlanStructure.TicketOutListInfo model = BLL.GetTicketOutInfoByOrderId(orderId); hidIsExtsisTicket.Value = model != null ? "1" : "0"; if (model != null) { piaomianjia = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Price); shui = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OilFee); pepoleNum = model.TicketKindInfoList.FirstOrDefault().PeopleCount.ToString(); DaiLiFei = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().AgencyPrice); Percent = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().Discount); OtherMoney = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().OtherPrice); piaokuan = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList.FirstOrDefault().TotalMoney); if (model.TicketKindInfoList.Count > 1) { piaomianjia2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Price); shui2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OilFee); pepoleNum2 = model.TicketKindInfoList[1].PeopleCount.ToString(); DaiLiFei2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].AgencyPrice); Percent2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].Discount); OtherMoney2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].OtherPrice); piaokuan2 = Utils.FilterEndOfTheZeroDecimal(model.TicketKindInfoList[1].TotalMoney); } Total = Utils.FilterEndOfTheZeroDecimal(model.Total); PNR = model.PNR; ddl_PayType.SelectedIndex = (int)model.PayType; Remark = model.Remark; Notice = model.Notice; this.hideId.Value = model.TicketOutId; if ((int)model.State >= 2) { lbtn_submit.Visible = false; } } } }
/// <summary> /// 绑定交通 /// </summary> private void BindTraffic() { //获取交通列表 List <EnumObj> typeli = EnumObj.GetList(typeof(TrafficType)); ddl_DepartureTraffic.DataTextField = "Text"; ddl_DepartureTraffic.DataValueField = "Value"; ddl_DepartureTraffic.DataSource = typeli; ddl_DepartureTraffic.DataBind(); ddl_ReturnTraffic.DataTextField = "Text"; ddl_ReturnTraffic.DataValueField = "Value"; ddl_ReturnTraffic.DataSource = typeli; ddl_ReturnTraffic.DataBind(); if (travelRangeType == (int)AreaType.地接线路 || travelRangeType == (int)AreaType.国内短线) { //周边 ddl_DepartureTraffic.SelectedIndex = 1; ddl_ReturnTraffic.SelectedIndex = 1; } else { //国际国内 ddl_DepartureTraffic.SelectedIndex = 0; ddl_ReturnTraffic.SelectedIndex = 0; } }
/// <summary> /// 设置rpeate控件数据 /// </summary> protected void SetDataList() { IList <EyouSoft.Model.TourStructure.TourTeamServiceInfo> list = this.SetList; string project = ""; IList <EnumObj> proList = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.ServiceType), new string[] { ((int)EyouSoft.Model.EnumType.TourStructure.ServiceType.签证).ToString() }); if (proList != null && proList.Count > 0) { project += "{value:\"-1\",text:\"--请选择--\"}|"; for (int i = 0; i < proList.Count; i++) { project += "{value:\"" + proList[i].Value + "\",text:\"" + proList[i].Text + "\"}|"; } project = project.TrimEnd('|'); } this.hideProList.Value = project; if (this.SetList != null && this.SetList.Count > 0) { this.hidePrice.Value = this.SetList.Count.ToString(); this.rptList.DataSource = this.SetList; this.rptList.DataBind(); } this.txtAllPrice.Value = Utils.FilterEndOfTheZeroDecimal(this.TotalAmount); txt_allPrice.Value = Utils.FilterEndOfTheZeroDecimal(this.all_price); txt_crPrice.Value = Utils.FilterEndOfTheZeroDecimal(this.cr_price); txt_rtPrice.Value = Utils.FilterEndOfTheZeroDecimal(this.rt_price); // this.txtOnePriceAll.Value = Utils.FilterEndOfTheZeroDecimal(this.OnePriceAll); }
/// <summary> /// 获得线路区域的Options /// </summary> /// <param name="selectIndex">设置选择项</param> /// <returns></returns> public static string GetSelect(string selectIndex, string type) { StringBuilder sb = new StringBuilder(); List <EnumObj> list = null; switch (type) { case "MemoUrgent": list = EnumObj.GetList(typeof(MemoUrgent)); break; case "MemoState": list = EnumObj.GetList(typeof(MemoState)); break; } sb.Append("<option value=\"-1\">-请选择-</option>"); if (list != null && list.Count > 0) { for (int i = 0; i < list.Count; i++) { if (list[i].Value != selectIndex) { sb.Append("<option value=\"" + list[i].Value + "\">" + list[i].Text + "</option>"); } else { sb.Append("<option value=\"" + list[i].Value + "\" selected=\"selected\">" + list[i].Text + "</option>"); } } } return(sb.ToString()); }
protected void BindHotelStart() { //清空下拉框选项 this.HotelStartList.Items.Clear(); this.HotelStartList.Items.Add(new ListItem("--请选择酒店星级--", "-1")); List <EnumObj> HotelStart = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.SupplierStructure.HotelStar)); if (HotelStart.Count > 0 && HotelStart != null) { for (int i = 0; i < HotelStart.Count; i++) { ListItem item = new ListItem(); switch (HotelStart[i].Value) { case "1": item.Text = "3星以下"; break; case "2": item.Text = "挂3"; break; case "3": item.Text = "准3"; break; case "4": item.Text = "挂4"; break; case "5": item.Text = "准4"; break; case "6": item.Text = "挂5"; break; case "7": item.Text = "准5"; break; default: break; } item.Value = HotelStart[i].Value; this.HotelStartList.Items.Add(item); } } }
/// <summary> /// 导游类别 /// </summary> /// <returns></returns> public string GetGuideCategory(IList <EyouSoft.Model.SourceStructure.MSourceGuideCategory> listType) { List <EnumObj> List = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.SourceStructure.GuideCategory)); StringBuilder s = new StringBuilder(); if (List != null && List.Count > 0) { string chk = ""; for (int i = 0; i < List.Count; i++) { if (listType != null && listType.Count > 0) { for (int j = 0; j < listType.Count; j++) { if (List[i].Value == ((int)listType[j].GuideCategory).ToString()) { chk = "checked=\"checked\""; break; } } } s.Append("<label><input type=\"checkbox\" " + chk + " name=\"guidType\" value=\"" + List[i].Value + "\" style=\"border: none;\" />" + List[i].Text + "</label> "); chk = ""; } } return(s.ToString()); }
/// <summary> /// 生成带option的计调项目 /// </summary> /// <param name="selectValue"></param> /// <returns></returns> protected string GetOptionByPlanProject(string selectValue) { StringBuilder sb = new StringBuilder(); IList <EnumObj> list = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.ComStructure.ContainProjectType)); if (list != null) { for (int i = 0; i < list.Count; i++) { EyouSoft.Model.EnumType.ComStructure.ContainProjectType model = (EyouSoft.Model.EnumType.ComStructure.ContainProjectType)Utils.GetInt(list[i].Value); //if (model == EyouSoft.Model.EnumType.ComStructure.ContainProjectType.用车 || model == EyouSoft.Model.EnumType.ComStructure.ContainProjectType.导服) //{ // sb.AppendFormat("<option {0} value='" + list[i].Value + "|2'>" + list[i].Text + "</option>", list[i].Value == selectValue ? "selected=selected" : ""); //} //else if (model == EyouSoft.Model.EnumType.ComStructure.ContainProjectType.其它) //{ // sb.AppendFormat("<option {0} value='" + list[i].Value + "|1'>" + list[i].Text + "</option>", list[i].Value == selectValue ? "selected=selected" : ""); //} //else //{ // sb.AppendFormat("<option {0} value='" + list[i].Value + "|0'>" + list[i].Text + "</option>", list[i].Value == selectValue ? "selected=selected" : ""); //} sb.AppendFormat("<option {0} value='" + list[i].Value + "|2'>" + list[i].Text + "</option>", list[i].Value == selectValue ? "selected=selected" : ""); } } return(sb.ToString()); }
protected void BindDropdownList() { //权限列表 int recount = 0; dropPermissions.DataSource = EyouSoft.BLL.CompanyStructure.CompanyUserRoles.CreateInstance().GetList(companyid, 1000, 1, ref recount); dropPermissions.DataTextField = "RoleName"; dropPermissions.DataValueField = "ID"; dropPermissions.DataBind(); //部门 IList <CompanyDepartment> listdepart = EyouSoft.BLL.CompanyStructure.CompanyDepartment.CreateInstance().GetList(companyid); this.dropDepartment.DataSource = listdepart; this.dropDepartment.DataTextField = "DepartName"; this.dropDepartment.DataValueField = "ID"; this.dropDepartment.DataBind(); this.dropDepartment.Items.Insert(0, new ListItem("请选择", "-1")); //性别 this.dropSex.DataSource = EnumObj.GetList(typeof(Sex)); this.dropSex.DataTextField = "Text"; this.dropSex.DataValueField = "Value"; this.dropSex.DataBind(); }
/// <summary> /// 初始化基础数据 /// </summary> private void InitData() { //初始化支付方式 rblPayment.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicPayment)); rblPayment.DataTextField = "Text"; rblPayment.DataValueField = "Value"; rblPayment.DataBind(); //初始化状态、审核状态 ddlState.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicTicketsStatus)); ddlState.DataTextField = "Text"; ddlState.DataValueField = "Value"; ddlState.DataBind(); ddlIsCheck.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ExamineStatus)); ddlIsCheck.DataTextField = "Text"; ddlIsCheck.DataValueField = "Value"; ddlIsCheck.DataBind(); //初始化b2b,b2c 显示位置 ddlB2B.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicB2BDisplay)); ddlB2B.DataTextField = "Text"; ddlB2B.DataValueField = "Value"; ddlB2B.DataBind(); ddlB2C.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicB2CDisplay)); ddlB2C.DataTextField = "Text"; ddlB2C.DataValueField = "Value"; ddlB2C.DataBind(); txtB2BSort.Value = "50"; txtB2CSort.Value = "50"; }
protected void BindDropDownList() { //国内国际周边 foreach (EnumObj item in EnumObj.GetList(typeof(AreaType))) { if (Utils.GetInt(item.Value) < 3) { this.dropLine.Items.Add(new ListItem(item.Text, item.Value)); } } this.dropLine.Items.Insert(0, new ListItem("请选择", "-1")); this.dropLine1.Items.Insert(0, new ListItem("请选择", "0")); //线路类型 foreach (EnumObj item in EnumObj.GetList(typeof(AreaType))) { if (Utils.GetInt(item.Value) < 3) { this.DropSearchLine.Items.Add(new ListItem(item.Text, item.Value)); } } this.DropSearchLine.Items.Insert(0, new ListItem("请选择", "-1")); }
/// <summary> /// 绑定查询下拉框 /// </summary> private void BindDropDownList() { ddlState.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicTicketsStatus)); ddlState.DataTextField = "Text"; ddlState.DataValueField = "Value"; ddlState.DataBind(); ddlState.Items.Insert(0, new ListItem("请选择", "0")); ddlCheck.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ExamineStatus)); ddlCheck.DataTextField = "Text"; ddlCheck.DataValueField = "Value"; ddlCheck.DataBind(); ddlCheck.Items.Insert(0, new ListItem("请选择", "0")); ddlB2B.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicB2BDisplay)); ddlB2B.DataTextField = "Text"; ddlB2B.DataValueField = "Value"; ddlB2B.DataBind(); ddlB2B.Items.Insert(0, new ListItem("请选择", "-1")); ddlB2C.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.ScenicStructure.ScenicB2CDisplay)); ddlB2C.DataTextField = "Text"; ddlB2C.DataValueField = "Value"; ddlB2C.DataBind(); ddlB2C.Items.Insert(0, new ListItem("请选择", "-1")); }
/// <summary> /// 页面初始化 /// </summary> /// <param name="id">操作ID</param> protected void PageInit(string id) { #region 参会人员选用控件初始化 this.HrSelect1.ParentIframeID = Utils.GetQueryStringValue("iframeId"); this.HrSelect1.SetTitle = "参会人员"; this.HrSelect1.SModel = "2"; IList <EnumObj> list = EnumObj.GetList(typeof(Category)); this.selType.DataSource = list; this.selType.DataTextField = "Text"; this.selType.DataValueField = "Value"; this.selType.AppendDataBoundItems = true; this.selType.DataBind(); #endregion //编辑初始化 if (!string.IsNullOrEmpty(id)) { EyouSoft.BLL.GovStructure.BMeeting BLL = new EyouSoft.BLL.GovStructure.BMeeting(); EyouSoft.Model.GovStructure.MGovMeeting Model = BLL.GetGovMeetingModel(id); if (null != Model) { this.hidId.Value = Model.MeetingId; //会议编号 this.txtNum.Text = Model.Number; //会议主题 this.txtTitle.Text = Model.Theme; //会议类型 this.selType.SelectedValue = ((int)Model.Category).ToString(); IList <EyouSoft.Model.GovStructure.MGovMeetingStaff> lst = Model.MGovMeetingStaff; StringBuilder strNames = new StringBuilder(); StringBuilder strIDs = new StringBuilder(); if (null != lst && lst.Count > 0) { foreach (MGovMeetingStaff m in lst) { strNames.Append(m.AcceptType + ","); strIDs.Append(m.AcceptTypeID + ","); } //参会人员名 this.HrSelect1.HrSelectName = Model.MeetingStaff; //strNames.Length > 0 ? strNames.ToString().Substring(0, strNames.Length - 1) : ""; //参会人员ID this.HrSelect1.HrSelectID = strIDs.Length > 0 ? strIDs.ToString().Substring(0, strIDs.Length - 1) : ""; } //会议时间 this.HrSelect1.HrSelectName = Model.MeetingStaff; this.txtStartTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", Model.StartTime); this.txtEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm}", Model.EndTime); //会议地点 this.txtPlace.Text = Model.Venue; //会议纪要 this.txtContent.Text = Model.Minutes; if (!this.SiteUserInfo.IsHandleElse && this.SiteUserInfo.UserId != Model.OperatorId) { this.ph_Save.Visible = false; } } } }
/// <summary> /// 初始商品类型 /// </summary> protected void initProTypeList() { var proTypeList = EnumObj.GetList(typeof(Model.ProductOp)); ddl_proType.DataSource = proTypeList; ddl_proType.DataTextField = "Text"; ddl_proType.DataValueField = "Value"; ddl_proType.DataBind(); }
/// <summary> /// 初始化合同类型 /// </summary> protected void initContact() { var ContractTypeList = EnumObj.GetList(typeof(Model.ContractType)); ddl_contact.DataSource = ContractTypeList; ddl_contact.DataTextField = "Text"; ddl_contact.DataValueField = "Value"; ddl_contact.DataBind(); }
/// <summary> /// 初始化订单状态 /// </summary> private void initOrderState() { var OrderStateList = EnumObj.GetList(typeof(Model.OrderState)); ddl_orderState.DataSource = OrderStateList; ddl_orderState.DataTextField = "Text"; ddl_orderState.DataValueField = "Value"; ddl_orderState.DataBind(); }
/// <summary> /// 绑定航空公司列表并初始化查询条件 /// </summary> /// <param name="AirLineIds">查询条件-售票处</param> private void Bindddl(int[] AirLineIds) { IList <EnumObj> proList = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.PlanStructure.FlightCompany)); ddlAirLineIds.Items.Add("--请选择--"); ddlAirLineIds.DataSource = proList; ddlAirLineIds.DataBind(); ddlAirLineIds.SelectedIndex = AirLineIds[0]; }
/// <summary> /// 支付方式 /// </summary> /// <param name="selectIndex"></param> /// <param name="ddl"></param> protected void DdlPayTypeInit() { IList <EnumObj> list = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.TourStructure.RefundType)); if (list != null && list.Count > 0) { ddlPayType.DataSource = list; ddlPayType.DataBind(); } }
//绑定结算账户类型 private void InitHotelAccountType() { //清空结算账户类型下拉列表 this.sla_clearanceaccount.Items.Clear(); // 结算账户类型 0:银行卡 1:中间账户财付通 enum this.sla_clearanceaccount.DataSource = EnumObj.GetList(typeof(EyouSoft.Model.HotelStructure.HotelAccountType)); this.sla_clearanceaccount.DataTextField = "Text"; this.sla_clearanceaccount.DataValueField = "Value"; this.sla_clearanceaccount.DataBind(); }
/// <summary> /// 绑定推荐类型 /// </summary> private void BindRecommendType() { //获取推荐类型列表 List <EnumObj> typeli = EnumObj.GetList(typeof(RecommendType)); //去除无这个状态 typeli.RemoveAt(0); rpt_type.DataSource = typeli; rpt_type.DataBind(); }
/// <summary> /// 绑定支付状态 /// </summary> /// <returns></returns> protected string BindPaymentStatus() { StringBuilder str = new StringBuilder(""); foreach (EnumObj item1 in EnumObj.GetList(typeof(PaymentStatus))) { str.Append(string.Format("<a href=\"javascript:void(0)\" onclick=\"FitManage.PaymentStatus(this,{0})\">{1}</a> ", item1.Value, item1.Text)); } return(str.ToString()); }
/// <summary> /// 绑定团队状态 /// </summary> private void BindPowderTourStatus() { //获取推荐类型列表 List <EnumObj> typeli = EnumObj.GetList(typeof(PowderTourStatus)); ddl_powderTourStatus.DataTextField = "Text"; ddl_powderTourStatus.DataValueField = "Value"; ddl_powderTourStatus.DataSource = typeli; ddl_powderTourStatus.DataBind(); }
/// <summary> /// 绑定推荐类型 /// </summary> private void BindRecommendType() { //获取推荐类型列表 List <EnumObj> typeli = EnumObj.GetList(typeof(RecommendType)); //去除无这个状态 typeli.RemoveAt(0); rpt_type.DataSource = typeli.Where(obj => obj.Value != ((int)RecommendType.推荐).ToString()).ToList(); rpt_type.DataBind(); }
protected string GetTourMarkerNote() { StringBuilder str = new StringBuilder(); List <EnumObj> listenum = EnumObj.GetList(typeof(PowderTourStatus)); foreach (EnumObj model in listenum) { str.AppendFormat("<a href=\"#\" onclick=\"ScatteredfightManage.changeState({0})\" class=\"{1}\">{2}</a> ", Convert.ToInt32(model.Value), GetClass(model.Text), model.Text); } return(str.ToString()); }
private void BindCardType() { this.ddlCardType.Items.Clear(); List <EnumObj> typeList = EnumObj.GetList(typeof(EyouSoft.Model.TicketStructure.TicketCardType)); if (typeList != null && typeList.Count > 0) { for (int i = 0; i < typeList.Count; i++) { ListItem list_CardType = new ListItem(); switch (typeList[i].Value) { case "-1": list_CardType.Text = "-请选择-"; break; case "0": list_CardType.Text = "身份证"; break; case "1": list_CardType.Text = "护照"; break; case "2": list_CardType.Text = "军官证"; break; case "3": list_CardType.Text = "台胞证"; break; case "4": list_CardType.Text = "港澳通行证"; break; } list_CardType.Value = typeList[i].Value; this.ddlCardType.Items.Add(list_CardType); } } //释放资源 typeList = null; //this.ddlCardType.Items.Add(new ListItem("请选择", "")); //string[] typeList = Enum.GetNames(typeof(EyouSoft.Model.TicketStructure.TicketCardType)); //if (typeList != null && typeList.Length > 0) //{ // foreach (string str in typeList) // { // this.ddlCardType.Items.Add(new ListItem(str, ((int)Enum.Parse(typeof(EyouSoft.Model.TicketStructure.TicketCardType), str)).ToString())); // } //} ////释放资源 //typeList = null; }
/// <summary> /// 设置线路类型,即推广状态 /// </summary> private void SetTourMarkerNote() { //权限判断 if (!IsGrantUpdate) { Response.Clear(); Response.Write("[{isSuccess:false,ErrorMessage:'对不起,你当前登录的帐号没有权限执行该操作!'}]"); Response.End(); } #region 获取推广状态 且转换成枚举 RecommendType SpreadState = new RecommendType(); List <RecommendType> listPowder = new List <RecommendType>(); foreach (EnumObj item in EnumObj.GetList(typeof(RecommendType))) { if (item.Value == Utils.GetQueryStringValue("TourMarkerNote")) { SpreadState = ((RecommendType)Utils.GetInt(item.Value)); } } #endregion #region 获取线路ID列表 string TemplateTourID = Utils.GetQueryStringValue("TemplateTourID"); string[] LineIdList = { "" }; if (!string.IsNullOrEmpty(TemplateTourID)) { TemplateTourID = TemplateTourID.TrimEnd('$'); if (TemplateTourID.Contains('$')) { LineIdList = TemplateTourID.Split('$'); } else { LineIdList[0] = TemplateTourID; } } #endregion EyouSoft.IBLL.NewTourStructure.IRoute Ibll = EyouSoft.BLL.NewTourStructure.BRoute.CreateInstance(); bool isTrue = Ibll.UpdateRouteRecommend(SpreadState, LineIdList); Ibll = null; Response.Clear(); if (isTrue) { Response.Write("1"); } else { Response.Write("error"); } Response.End(); }
//绑定航空公司 protected void AirDataBind(int value) { IList <EnumObj> proList = EnumObj.GetList(typeof(EyouSoft.Model.EnumType.PlanStructure.FlightCompany)); ddlAirLineIds.DataSource = proList; ddlAirLineIds.DataBind(); ListItem item = new ListItem(); item.Value = "-1"; item.Text = "--请选择--"; this.ddlAirLineIds.Items.Insert(0, item); this.ddlAirLineIds.SelectedIndex = value; }
protected void initData() { //this.InitProvince(); List <EnumObj> lstComScale = EnumObj.GetList(typeof(EyouSoft.Model.CompanyStructure.CompanyScale)); if (null != lstComScale && lstComScale.Count > 0) { this.ddlScale.DataSource = lstComScale; this.ddlScale.DataTextField = "text"; this.ddlScale.DataValueField = "value"; this.ddlScale.DataBind(); } }
/// <summary> /// 绑定供应商类型 /// </summary> protected void GetSendBusiness() { StringBuilder sb = new StringBuilder(); int i = 0; List <EnumObj> BusinessList = EnumObj.GetList(typeof(EyouSoft.Model.CompanyStructure.CompanyLev)); foreach (var item in BusinessList) { i++; sb.AppendFormat("<input type=\"checkbox\" name=\"BusinessType\" value=\"{0}\" id=\"cbx_{1}\" valid=\"requireChecked\" min=\"1\" errmsgend=\"BusinessType\" errmsg=\"至少选择一个供应商类型!\"/><label for=\"cbx_{1}\">{2}</label> ", item.Value, i, item.Text); } SendBusinessType = sb.ToString(); }
private void BindDropDownList() { this.dropMemoUrgent.DataSource = EnumObj.GetList(typeof(MemoUrgent)); this.dropMemoUrgent.DataTextField = "Text"; this.dropMemoUrgent.DataValueField = "Value"; this.dropMemoUrgent.DataBind(); this.dropMemoUrgent.Items.Insert(0, new ListItem("--请选择--", "-1")); this.dropMemoState.DataSource = EnumObj.GetList(typeof(MemoState)); this.dropMemoState.DataTextField = "Text"; this.dropMemoState.DataValueField = "Value"; this.dropMemoState.DataBind(); this.dropMemoState.Items.Insert(0, new ListItem("--请选择--", "-1")); }