Exemple #1
0
        //-----------------------------------------------------------

        #region --------------LoadData--------------
        //---------------------------------------------------------
        //LoadData
        //---------------------------------------------------------
        public void LoadData()
        {
            List <ItemsEntity> itemsList = ItemsFactory.GetAll(ModuleTypeID, CategoryID, true, OwnerID);
            Repeater           r         = (Repeater)this.FindControl(TemplateID);

            if (itemsList != null && itemsList.Count > 0)
            {
                r.DataSource = itemsList;
                r.DataBind();
            }
        }
Exemple #2
0
        //-----------------------------------------------------------

        #region --------------LoadData--------------
        //---------------------------------------------------------
        //LoadData
        //---------------------------------------------------------
        public void LoadData()
        {
            List <ItemsEntity> itemsList = ItemsFactory.GetAll(ModuleTypeID, CategoryID, true, OwnerID);
            int quant = 0;

            foreach (ItemsEntity item in itemsList)
            {
                quant        = CheckQuant(item.ItemID);
                item.MailBox = quant.ToString();
                item.ZipCode = (Convert.ToInt32(item.Price) * quant).ToString();
            }
            if (itemsList != null && itemsList.Count > 0)
            {
                dlItems.DataSource = itemsList;
                dlItems.DataBind();
                dlItems.Visible = true;
                //lblResult.Visible = false;
            }
            else
            {
                this.Visible = false;
            }
        }
        //-----------------------------------------------------------

        #region --------------LoadData--------------
        //---------------------------------------------------------
        //LoadData
        //---------------------------------------------------------
        public void LoadData()
        {
            //---------------------------------------------------------
            int categoryID = 0;

            if (MoversFW.Components.UrlManager.ChechIsValidIntegerParameter("id"))
            {
                categoryID = Convert.ToInt32(Request.QueryString["id"]);
            }
            //---------------------------------------------------------
            string keywords = "";

            if (trSearch.Visible)
            {
                keywords = txtSearch.Text;
            }
            //---------------------------------------------------------
            pager.PageSize = currentModule.PageItemCount_UserDefault;
            List <ItemsEntity> itemsList = ItemsFactory.GetAll(ModuleTypeID, categoryID, true, pager.CurrentPage, pager.PageSize, out totalRecords, keywords, OwnerID);

            Control  c;
            DataList dl;
            Repeater r;

            c = this.FindControl(TemplateID);
            if (c is DataList)
            {
                dl = (DataList)c;
                LoadDataList(dl, itemsList);
            }
            else
            {
                r = (Repeater)c;
                LoadRepeater(r, itemsList);
            }
        }