/// <summary> /// 创建IBLL实例对象 /// </summary> /// <returns></returns> public static EyouSoft.IBLL.TicketStructure.ITicketSeattle CreateInstance() { EyouSoft.IBLL.TicketStructure.ITicketSeattle op = null; if (op == null) { op = EyouSoft.Component.Factory.ComponentFactory.CreateDAL <EyouSoft.IBLL.TicketStructure.ITicketSeattle>(); } return(op); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <returns></returns> protected string GetCityNameById(string id) { string str = ""; string[] list = id.Split(','); EyouSoft.IBLL.TicketStructure.ITicketSeattle cityIbll = EyouSoft.BLL.TicketStructure.TicketSeattle.CreateInstance(); if (list.Length > 0) { for (int i = 0; i < list.Length; i++) { EyouSoft.Model.TicketStructure.TicketSeattle model = cityIbll.GetTicketSeattleById(Convert.ToInt32(list[i])); if (model != null) { str += model.Seattle + "、"; } } } str = str.TrimEnd('、'); return(str); }
public void ProcessRequest(HttpContext context) { context.Response.ContentType = "text/plain"; EyouSoft.IBLL.TicketStructure.ITicketSeattle seattleBll = EyouSoft.BLL.TicketStructure.TicketSeattle.CreateInstance(); int? seattleId = Utils.GetIntNull(Utils.GetQueryStringValue("seattleId")); bool isSelect = Utils.GetQueryStringValue("isSelect") == "isSelect"; int selectId = Utils.GetInt(Utils.GetQueryStringValue("selectId")); IList <EyouSoft.Model.TicketStructure.TicketSeattle> seattleList = seattleBll.GetTicketSeattleByFreight(seattleId); StringBuilder strBuilder = new StringBuilder(); strBuilder.Append("<option value=\"0\" >请选择城市</option>"); if (seattleList != null && seattleList.Count > 0) { foreach (EyouSoft.Model.TicketStructure.TicketSeattle seat in seattleList) { strBuilder.AppendFormat("<option value=\"{0}\" {3}>{1}({2})</option>", seat.SeattleId, seat.Seattle, seat.LKE, (isSelect && selectId == seat.SeattleId)?"selected=\"selected\"":""); } } context.Response.Clear(); context.Response.Write(strBuilder.ToString()); context.Response.End(); }