Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         EstateCmService estateService = new EstateCmService();
         int             recordCount;
         string          type      = ConvertUtility.Trim(Request.QueryString["type"]);
         string          code      = ConvertUtility.Trim(Request.QueryString["code"]);
         int             pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"], 1);
         this.PageSize = AppSettings.PageSize;
         IList <EstateCmType> estateCollection = estateService.GetEstateByType(type, code, pageIndex, this.PageSize, out recordCount);
         this.RecordCount      = recordCount;
         this.EstateCollection = new List <EstateCmType>();
         foreach (var item in estateCollection)
         {
             EstateCmType estateType = item;
             OrderType    orderType  = estateService.GetOrder(item.EstateId);
             if (orderType != null)
             {
                 estateType.IsOrder     = true;
                 estateType.OrderStatus = orderType.StatusId;
                 if (estateType.OrderStatus == OrderStatus.COMPARED)
                 {
                     estateType.CompareDate = estateService.GetComparedEstate(estateType.EstateId).ComparedDate;
                 }
             }
             this.EstateCollection.Add(estateType);
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         EstateCmService estateService = new EstateCmService();
         int             recordCount;
         string          type      = ConvertUtility.Trim(Request.QueryString["type"]);
         string          code      = ConvertUtility.Trim(Request.QueryString["code"]);
         int             pageIndex = ConvertUtility.ToInt(Request.QueryString["pageIndex"]);
         this.PageSize         = AppSettings.PageSize;
         this.EstateCollection = estateService.GetEstateByType(type, code, pageIndex, this.PageSize, out recordCount);
         this.RecordCount      = recordCount;
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }