Пример #1
0
        /// <summary>
        /// 初始化所有的出港城市
        /// </summary>
        /// <returns></returns>
        private void InitLeaveCity()
        {
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.SystemStructure.ISysCity         bll  = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.SysCity> list = bll.GetCityList();

            if (list != null && list.Count > 0)
            {
                IList <EyouSoft.Model.SystemStructure.SysCity> listProvince = new List <EyouSoft.Model.SystemStructure.SysCity>();
                Hashtable hashP = new Hashtable();
                foreach (EyouSoft.Model.SystemStructure.SysCity model in list)
                {
                    if (model.IsSite && model.IsEnabled)
                    {
                        if (!hashP.Contains(model.ProvinceId))
                        {
                            hashP.Add(model.ProvinceId, model);
                            listProvince.Add(model);
                        }
                    }
                }
                if (listProvince != null && listProvince.Count > 0)
                {
                    this.rptProvinceID.DataSource = listProvince;
                    this.rptProvinceID.DataBind();
                }
                listProvince = null;
            }
            list = null;
            bll  = null;
        }
Пример #2
0
        protected string GetIsSiteCity(string ProvinceID)
        {
            StringBuilder str = new StringBuilder();

            EyouSoft.IBLL.SystemStructure.ISysCity         bll  = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance();
            IList <EyouSoft.Model.SystemStructure.SysCity> list = bll.GetCityList(int.Parse(ProvinceID), 0, string.Empty, true, true);

            if (list != null && list.Count > 0)
            {
                foreach (EyouSoft.Model.SystemStructure.SysCity model in list)
                {
                    str.AppendFormat("<label for=\"chkLeaveCityID{0}\" hideFocus=\"false\"><input type=\"checkbox\" name=\"chkLeaveCityID\" id=\"chkLeaveCityID{0}\" value=\"{0}|{1}\" />{1}&nbsp;&nbsp;", model.CityId, model.CityName);
                }
            }
            list = null;
            bll  = null;
            return(str.ToString());
        }