Esempio n. 1
0
        private void Search()
        {
            String    fe       = BuildFilterExpression();
            DataTable dtCommon = null;

            switch (Action)
            {
            case "ItemAdvanceSearch":
                dtCommon = FCCMDItem_Custom.GetFacadeCreate().GetDT(100000, 1, String.Empty, fe);
                break;

            case "ItemCategoryAdvanceSearch":
                dtCommon = FCCMDItemCategory.GetFacadeCreate().GetDT(1, 10000, String.Empty, fe, DatabaseOperationType.LoadWithFilterExpression);
                break;

            default:
                break;
            }

            //lvCMNAdvanceSearch.DataSource = dtCommon;
            //lvCMNAdvanceSearch.DataBind();

            lblSearch.Visible = true;
            grvCMNAdvanceSearch.DataSource = dtCommon;
            grvCMNAdvanceSearch.DataBind();
        }
Esempio n. 2
0
        public IList <MDItem_CustomEntity> GetPagedData(Int32 startRowIndex, Int32 pageSize, String sortExpression, String filterExpression)
        {
            IList <MDItem_CustomEntity> mDItem_CustomEntityList = new List <MDItem_CustomEntity>();

            try
            {
                if (String.IsNullOrEmpty(sortExpression))
                {
                    sortExpression = "ItemID";
                }

                Int32 currentPage = Convert.ToInt32(startRowIndex / pageSize) + 1;
                //startRowIndex = Convert.ToInt32(  startRowIndex / pageSize) + 1;

                if (pageSize == -1)
                {
                    pageSize = 1000000000;
                }

                mDItem_CustomEntityList = FCCMDItem_Custom.GetFacadeCreate().GetIL(pageSize, currentPage, sortExpression, filterExpression);

                if (mDItem_CustomEntityList != null && mDItem_CustomEntityList.Count > 0)
                {
                    totalRowCount = mDItem_CustomEntityList[0].TotalRowCount;
                }
            }
            catch (Exception ex)
            {
            }

            return(mDItem_CustomEntityList ?? new List <MDItem_CustomEntity>());
        }