private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                int    _limit  = 20;
                int    _skip   = 0;
                if (_page != 0)
                {
                    _skip = _page * _limit - _limit;
                }
                var AllList = (from g in DB.ESHOP_CUSTOMERs
                               where ("" == keyword || (g.CUSTOMER_FULLNAME.ToString()).Contains(keyword)) &&
                               g.CUSTOMER_TYPE == 1
                               select g).OrderByDescending(n => n.CUSTOMER_ID);


                if (AllList.ToList().Count > 0)
                {
                    Session["CustomerList"] = DataUtil.LINQToDataTable(AllList);
                }

                RplistCustomer.DataSource = AllList.Skip(_skip).Take(_limit);
                RplistCustomer.DataBind();
                LitPage.Text = pagechange.changePage("customer_Partner_List.aspx", AllList.ToList().Count, _limit, _page);
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Beispiel #2
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                int    _limit  = 20;
                int    _skip   = 0;
                if (_page != 0)
                {
                    _skip = _page * _limit - _limit;
                }
                var AllList = (from g in DB.ESHOP_AD_ITEMs
                               orderby g.AD_ITEM_PUBLISHDATE descending, g.AD_ITEM_ORDER descending
                               where ("" == keyword || (g.AD_ITEM_CODE).Contains(keyword) || (g.AD_ITEM_DESC).Contains(keyword))
                               select g).OrderByDescending(n => n.AD_ITEM_ID);


                if (AllList.ToList().Count > 0)
                {
                    Session["AdItemList"] = DataUtil.LINQToDataTable(AllList);
                }

                Rplistaditem.DataSource = AllList.Skip(_skip).Take(_limit);
                Rplistaditem.DataBind();
                LitPage.Text = pagechange.changePage("aditem_list.aspx", AllList.ToList().Count, _limit, _page);
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Beispiel #3
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                int    _limit  = 20;
                int    _skip   = 0;
                if (_page != 0)
                {
                    _skip = _page * _limit - _limit;
                }
                var AllList = (from g in DB.ESHOP_CONTACTs
                               where ("" == keyword || (g.CONTACT_NAME).Contains(keyword) || (g.CONTACT_EMAIL).Contains(keyword) ||
                                      (g.CONTACT_TITLE).Contains(keyword) || (g.CONTACT_CONTENT).Contains(keyword) ||
                                      g.CONTACT_NAME.Contains(keyword) || g.CONTACT_EMAIL.Contains(keyword) ||
                                      g.CONTACT_TITLE.Contains(keyword) || g.CONTACT_CONTENT.Contains(keyword)) &&
                               g.CONTACT_TYPE != 1
                               orderby g.CONTACT_PUBLISHDATE descending
                               select g);


                if (AllList.ToList().Count > 0)
                {
                    Session["ContactList"] = DataUtil.LINQToDataTable(AllList);
                }

                RplistContact.DataSource = AllList.Skip(_skip).Take(_limit);
                RplistContact.DataBind();
                LitPage.Text = pagechange.changePage("contact_list.aspx", AllList.ToList().Count, _limit, _page);
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Beispiel #4
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                int    _limit  = 20;
                int    _skip   = 0;
                if (_page != 0)
                {
                    _skip = _page * _limit - _limit;
                }
                var AllList = (from g in DB.ESHOP_NEWS_COMMENTs
                               where ("" == keyword || g.COMMENT_NAME.Contains(keyword)) &&
                               g.COMMENT_FIELD3 == null
                               orderby g.COMMENT_ID descending
                               select g);


                if (AllList.ToList().Count > 0)
                {
                    Rplistcomment.DataSource = AllList.Skip(_skip).Take(_limit);
                    Rplistcomment.DataBind();
                    LitPage.Text = pagechange.changePage("page-comment.aspx", AllList.ToList().Count, _limit, _page);
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Beispiel #5
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                //int Cat_Id=Utils.CIntDef(ddlCategory.SelectedValue);
                DateTime fromDate = ucFromDate.returnDate;
                DateTime toDate   = new DateTime(ucToDate.returnDate.Year, ucToDate.returnDate.Month, ucToDate.returnDate.Day, 23, 59, 59);
                int      _limit   = 20;
                int      _skip    = 0;
                if (_page != 0)
                {
                    _skip = _page * _limit - _limit;
                }
                int _status = Utils.CIntDef(ddlStatus.SelectedValue);
                var AllList = (from o in DB.ESHOP_ORDERs
                               join o_i in DB.ESHOP_ORDER_ITEMs on o.ORDER_ID equals o_i.ORDER_ID
                               where ("" == keyword || (o.ORDER_CODE).Contains(keyword) || (o.ORDER_FIELD1).Contains(keyword)) &&
                               o.ORDER_PUBLISHDATE <= toDate && o.ORDER_PUBLISHDATE >= fromDate &&
                               (_status != 99 ? o.ORDER_STATUS == _status : true)
                               orderby o.ORDER_PUBLISHDATE descending
                               select o).Distinct().OrderByDescending(n => n.ORDER_ID);

                if (AllList.ToList().Count > 0)
                {
                    Session["OrderList"] = DataUtil.LINQToDataTable(AllList);
                }

                RplistOrder.DataSource = AllList.Skip(_skip).Take(_limit);;
                RplistOrder.DataBind();
                LitPage.Text = pagechange.changePage("order_list.aspx", AllList.ToList().Count, _limit, _page);
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }