Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                int    recordCount;
                string type     = ConvertUtility.Trim(Request.QueryString["type"]);
                string estateId = ConvertUtility.Trim(Request.QueryString["code"]);

                this.EstateId = estateId;
                this.PageSize = AppSettings.PageSize;
                EstateCmService estateService = new EstateCmService();
                EstateCm        estate        = estateService.GetEstateById(this.EstateId);
                this.TitleBar = estate.ToNavBar(false);
                BuildCmService     buildService   = new BuildCmService();
                ComparedEstateType comparedEstate = estateService.GetComparedEstate(estateId);
                if (comparedEstate != null)
                {
                    this.ComparedBuildCollection = buildService.ListComparedBuild(comparedEstate, 1, this.PageSize, out recordCount);
                }
                else
                {
                    this.BuildCollection = buildService.ListBuild(this.EstateId, 1, this.PageSize, out recordCount);
                }
                this.RecordCount = recordCount;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Ejemplo n.º 2
0
        private string GetTitleBar(string type, string code)
        {
            string titleBar   = string.Empty;
            string searchMenu = string.Empty;

            switch (type)
            {
            case Architectures.CITY:
            {
                City city = new City(code);
                titleBar = city.ToNavBar(false);
                break;
            }

            case Architectures.REGION:
            {
                Region region = new Region(code);
                titleBar = region.ToNavBar(false);
                break;
            }

            case Architectures.SCOPE:
            {
                Scope scope = new Scope(code);
                titleBar = scope.ToNavBar(false);
                break;
            }

            case Architectures.BIGESTATE:
            {
                EstateCmService estateService = new EstateCmService();
                EstateCm        estate        = estateService.GetEstateById(code);
                titleBar = estate.ToNavBar(false);
                break;
            }

            default:
                break;
            }
            return(titleBar);
        }