Example #1
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.PHIEUTHUs
                               orderby g.PHIEUTHU_DATE descending
                               where ("" == keyword || (g.PHIEUTHU_NAMEHV).Contains(keyword) || (g.PHIEUTHU_PHONEHV).Contains(keyword))
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            //try
            //{
            string keyword = txtKeyword.Value;

            var AllList = (from g in DB.ESHOP_CONTACT_BOOKINGs
                           where ("" == keyword || (g.CONT_FULLNAME.ToString()).Contains(keyword))
                           select g).OrderByDescending(n => n.CONT_ID).ToList();


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

            GridItemList.DataSource = AllList;
            if (AllList.Count > GridItemList.PageSize)
            {
                GridItemList.AllowPaging = true;
            }
            else
            {
                GridItemList.AllowPaging = false;
            }
            GridItemList.DataBind();

            //}
            //catch (Exception ex)
            //{
            //    clsVproErrorHandler.HandlerError(ex);
            //}
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;
                int    quyen   = Utils.CIntDef(ddlLoai.SelectedItem.Value);
                var    AllList = (from g in DB.ESHOP_CUSTOMERs
                                  where ("" == keyword || (g.CUSTOMER_FULLNAME.ToString()).Contains(keyword)) &&
                                  (g.CUSTOMER_QUYEN == quyen || quyen == 0)
                                  select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_EMAILTEMPLATEs
                               where ("" == keyword || (g.CODE).Contains(keyword) || (g.SUBJECT).Contains(keyword) || (g.BODY).Contains(keyword) || (g.NOTE).Contains(keyword))
                               //&& g.LANGUAGE == lang
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_COLORs
                               where "" == keyword || DB.fClearUnicode(g.COLOR_NAME).Contains(keyword) || DB.fClearUnicode(g.COLOR_DESC).Contains(keyword)
                               orderby g.COLOR_PRIORITY descending
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                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))
                               //&& (g.AD_ITEM_LANGUAGE == lang)
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #7
0
 protected void GridItemList_PageIndexChanged(object source, DataGridPageChangedEventArgs e)
 {
     GridItemList.CurrentPageIndex = e.NewPageIndex;
     _count = (Utils.CIntDef(GridItemList.CurrentPageIndex, 0) * GridItemList.PageSize);
     GridItemList.DataSource = Session["ImgList"] as DataTable;
     GridItemList.DataBind();
 }
Example #8
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_ALBUMs
                               where "" == keyword || (g.ALBUM_NAME.ToString()).Contains(keyword) || (g.ALBUM_ORDER.ToString()).Contains(keyword) ||
                               (g.ALBUM_TYPE.ToString()).Contains(keyword) || (g.ALBUM_LANGUAGE.ToString()).Contains(keyword) ||
                               (g.ALBUM_DESC.ToString()).Contains(keyword)
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        protected void Change_nguon(object sender, EventArgs e)
        {
            int N_ID = Utils.CIntDef(Ddnguon.SelectedValue, 0);
            var s    = (from a in DB.ESHOP_NEWs
                        join b in DB.ESHOP_NEWS_CATs on a.NEWS_ID equals b.NEWS_ID
                        where (a.NEWS_TYPE == N_ID || N_ID == -1) &&
                        (a.NEWS_TYPE != 1 && a.NEWS_TYPE != 2)
                        //&& a.NEWS_LANGUAGE == lang
                        select a).OrderByDescending(n => n.NEWS_PUBLISHDATE).ToList();

            //var s = DB.ESHOP_NEWs.Where(n => n.NEWS_TYPE == N_ID || N_ID == -1).ToList();
            if (s.Count > 0)
            {
                Session["ProList"] = DataUtil.LINQToDataTable(s);
            }

            GridItemList.DataSource = s;
            if (s.ToList().Count > GridItemList.PageSize)
            {
                GridItemList.AllowPaging = true;
            }
            else
            {
                GridItemList.AllowPaging = false;
            }
            GridItemList.DataBind();
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.Products
                               where "" == keyword || g.product_name.Contains(keyword)
                               orderby g.product_id descending
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = CpanelUtils.ClearUnicode(txtKeyword.Value);

                var AllList = (from g in DB.ESHOP_NEWs
                               where ("" == keyword || DB.fClearUnicode(g.NEWS_TITLE).Contains(keyword) || g.NEWS_DESC.Contains(keyword))
                               //&& g.NEWS_LANGUAGE == lang
                               && (g.NEWS_TYPE != 1 && g.NEWS_TYPE != 2)
                               orderby g.NEWS_ID descending
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void Load_Vieclam()
        {
            //var list = list_pro.Load_listprobyPeriod(1, 2, _Catid, - 1);
            //if (list != null && list.Count > 0)
            //{
            //    rptViecLam_Hot.DataSource = list.Take(6);
            //    rptViecLam_Hot.DataBind();
            //}
            var list2 = list_pro.Load_listprobytype(1, _Catid, 2, -1);

            if (list2 != null && list2.Count > 0)
            {
                rptUngvien_XemNhieu.DataSource = list2.OrderByDescending(n => n.NEWS_COUNT).Take(6);
                rptUngvien_XemNhieu.DataBind();
            }
            var list = list_pro.Load_listprobytype(1, _Catid, 2, -1);

            if (list != null && list.Count > 0)
            {
                CollectionPager5.MaxPages      = 5;
                CollectionPager5.PageSize      = 30;
                CollectionPager5.Visible       = true;
                CollectionPager5.DataSource    = list.OrderByDescending(n => n.NEWS_UPDATEFRERESH).Take(150).ToList();
                CollectionPager5.BindToControl = GridItemList;
                GridItemList.DataSource        = CollectionPager5.DataSourcePaged;
                GridItemList.DataBind();
            }
        }
 protected void Drchuyenmuc_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         int id   = Utils.CIntDef(ddlCategory.SelectedValue);
         var list = (from a in DB.ESHOP_NEWs
                     join b in DB.ESHOP_NEWS_CATs on a.NEWS_ID equals b.NEWS_ID
                     join c in DB.ESHOP_CATEGORies on b.CAT_ID equals c.CAT_ID
                     where (c.CAT_ID == id || c.CAT_PARENT_PATH.Contains(id.ToString()))
                     //&& c.CAT_LANGUAGE == lang && a.NEWS_LANGUAGE == lang
                     select a).OrderByDescending(n => n.NEWS_PUBLISHDATE).ToList();
         GridItemList.DataSource = list;
         if (list.ToList().Count > GridItemList.PageSize)
         {
             GridItemList.AllowPaging = true;
         }
         else
         {
             GridItemList.AllowPaging = false;
         }
         GridItemList.DataBind();
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #14
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.VL_HINHTHUCNOPHOSOs
                               where ("" == keyword || (g.NAME).Contains(keyword))
                               select new
                {
                    g.ID,
                    g.NAME,
                    g.DESCRIPTION,
                    g.ACTIVE,
                    g.PRIORITY
                });

                Session["PropList"]     = DataUtil.LINQToDataTable(AllList);
                GridItemList.DataSource = AllList;
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #15
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_WEBLINKs
                               where "" == keyword || (g.WEBSITE_LINKS_NAME).Contains(keyword) || (g.WEBSITE_LINKS_URL).Contains(keyword)
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #16
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_EMAILs
                               where "" == keyword || (g.EMAIL_DESC).Contains(keyword) || (g.EMAIL_FROM).Contains(keyword) || (g.EMAIL_TO).Contains(keyword) || (g.EMAIL_CC).Contains(keyword) || (g.EMAIL_BCC).Contains(keyword)
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_ONLINEs
                               where ("" == keyword || (g.ONLINE_NICKNAME).Contains(keyword) || (g.ONLINE_DESC).Contains(keyword))
                               //&& g.ONLINE_LANGUAGE == lang
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_POINTs
                               where "" == keyword || (g.POINT_POINT_TO_MONEY.ToString()).Contains(keyword) || (g.POINT_MONEY_TO_POINT.ToString()).Contains(keyword)
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #19
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_NEWS_IMAGEs
                               where ("" == keyword || (g.NEWS_IMG_DESC).Contains(keyword)) &&
                               g.NEWS_ID == m_news_id
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_POINTs
                               orderby g.POINT_ID descending
                               where ("" == keyword || (g.POINT_FIELD1).Contains(keyword))
                               select g);


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #21
0
        private void SearchResult()
        {
            try
            {
                string keyword = CpanelUtils.ClearUnicode(txtKeyword.Value);

                var AllList = (from g in DB.ESHOP_CATEGORies
                               where ("" == keyword || (DB.fClearUnicode(g.CAT_NAME)).Contains(keyword)) && g.CAT_RANK > 0
                               //&& g.CAT_LANGUAGE == lang
                               select new {
                    g.CAT_ID,
                    g.CAT_PARENT_ID,
                    CAT_NAME = (string.IsNullOrEmpty(g.CAT_CODE) ? g.CAT_NAME : g.CAT_NAME + "(" + g.CAT_CODE + ")"),
                    g.CAT_POSITION,
                    g.CAT_LANGUAGE,
                    g.CAT_ORDER,
                    g.CAT_PERIOD_ORDER,
                    g.CAT_RANK
                });

                if (AllList.ToList().Count > 0)
                {
                    DataRelation relCat;
                    Session["CatList"] = DataUtil.LINQToDataTable(AllList);
                    //DataTable tbl = Session["CatList"] as DataTable;
                    DataTable tbl = DataUtil.LINQToDataTable(AllList);

                    DataSet ds = new DataSet();
                    ds.Tables.Add(tbl);

                    tbl.PrimaryKey = new DataColumn[] { tbl.Columns["CAT_ID"] };
                    relCat         = new DataRelation("Category_parent", ds.Tables[0].Columns["CAT_ID"], ds.Tables[0].Columns["CAT_PARENT_ID"], false);

                    ds.Relations.Add(relCat);
                    DataSet   dsCat    = ds.Clone();
                    DataTable CatTable = ds.Tables[0];

                    DataUtil.TransformTableWithSpace(ref CatTable, dsCat.Tables[0], relCat, null);
                    if (IsPostBack)
                    {
                        GridItemList.DataSource = AllList;
                        GridItemList.DataBind();
                    }
                    else
                    {
                        GridItemList.DataSource = dsCat.Tables[0];
                        GridItemList.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #22
0
        private void LoadCat()
        {
            try
            {
                var AllList = (from g in DB.ESHOP_CATEGORies
                               where g.CAT_RANK > 0
                               //&& g.CAT_LANGUAGE == lang
                               select new
                {
                    g.CAT_ID,
                    g.CAT_PARENT_ID,
                    g.CAT_RANK,
                    CAT_NAME = (string.IsNullOrEmpty(g.CAT_CODE) ? g.CAT_NAME : g.CAT_NAME + "(" + g.CAT_CODE + ")")
                });

                if (AllList.ToList().Count > 0)
                {
                    DataRelation relCat;
                    Session["CatNewsList"] = DataUtil.LINQToDataTable(AllList);
                    DataTable tbl = Session["CatNewsList"] as DataTable;

                    DataSet ds = new DataSet();
                    ds.Tables.Add(tbl);

                    tbl.PrimaryKey = new DataColumn[] { tbl.Columns["CAT_ID"] };
                    relCat         = new DataRelation("Category_parent", ds.Tables[0].Columns["CAT_ID"], ds.Tables[0].Columns["CAT_PARENT_ID"], false);

                    ds.Relations.Add(relCat);
                    DataSet   dsCat    = ds.Clone();
                    DataTable CatTable = ds.Tables[0];

                    DataUtil.TransformTableWithSpace(ref CatTable, dsCat.Tables[0], relCat, null);

                    GridItemList.DataSource = dsCat.Tables[0];
                    GridItemList.DataBind();
                }


                //var allCat=DB.GetTable<ESHOP_CATEGORy>();

                //GridItemList.DataSource = allCat;
                //GridItemList.DataBind();

                //Session["CatNewsList"] = allCat;
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void LoadCat()
        {
            try
            {
                if (m_news_type == 2)
                {
                    var AllList = (from g in DB.ESHOP_NEWs
                                   where g.NEWS_TYPE == 1
                                   select new
                    {
                        g.NEWS_ID,
                        g.NEWS_TITLE
                    });

                    if (AllList.ToList().Count > 0)
                    {
                        Session["NewsNewsList"] = DataUtil.LINQToDataTable(AllList);
                        DataTable tbl = Session["NewsNewsList"] as DataTable;

                        GridItemList.Columns[2].HeaderText = "Món ăn";
                        GridItemList.DataSource            = tbl;
                        GridItemList.DataBind();
                    }
                }
                if (m_news_type == 1)
                {
                    var AllList = (from g in DB.ESHOP_NEWs
                                   where g.NEWS_TYPE == 2
                                   select new
                    {
                        g.NEWS_ID,
                        g.NEWS_TITLE
                    });

                    if (AllList.ToList().Count > 0)
                    {
                        Session["NewsNewsList"] = DataUtil.LINQToDataTable(AllList);
                        DataTable tbl = Session["NewsNewsList"] as DataTable;
                        GridItemList.Columns[2].HeaderText = "Nguyên liệu";
                        GridItemList.DataSource            = tbl;
                        GridItemList.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_PROPERTies
                               where ("" == keyword || (g.PROP_NAME).Contains(keyword)) && g.PROP_RANK > 0
                               select new
                {
                    g.PROP_ID,
                    g.PROP_PARENT_ID,
                    g.PROP_NAME,
                    g.PROP_RANK
                });

                if (AllList.ToList().Count > 0)
                {
                    DataRelation relCat;
                    Session["PropList"] = DataUtil.LINQToDataTable(AllList);
                    //DataTable tbl = Session["CatList"] as DataTable;
                    DataTable tbl = DataUtil.LINQToDataTable(AllList);

                    DataSet ds = new DataSet();
                    ds.Tables.Add(tbl);

                    tbl.PrimaryKey = new DataColumn[] { tbl.Columns["PROP_ID"] };
                    relCat         = new DataRelation("Category_parent", ds.Tables[0].Columns["PROP_ID"], ds.Tables[0].Columns["PROP_PARENT_ID"], false);

                    ds.Relations.Add(relCat);
                    DataSet   dsCat    = ds.Clone();
                    DataTable CatTable = ds.Tables[0];

                    CpanelUtils.TransformTableWithSpace(ref CatTable, dsCat.Tables[0], relCat, null);

                    GridItemList.DataSource = dsCat.Tables[0];
                    //if (CatTable.Rows.Count > GridItemList.PageSize)
                    //    GridItemList.AllowPaging = true;
                    //else
                    //    GridItemList.AllowPaging = false;
                    GridItemList.DataBind();
                }
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #25
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ORDER_CONTACTs
                               join a in DB.ESHOP_NEWs on g.NEWS_ID equals a.NEWS_ID
                               where ("" == keyword || (g.ORDER_USERNAME).Contains(keyword) || (g.ORDER_EMAIL).Contains(keyword) ||
                                      (g.ORDER_ADD).Contains(keyword) || (g.ORDER_PHONE).Contains(keyword) || a.NEWS_TITLE.Contains(keyword))
                               orderby g.ODER_DATE descending
                               select new {
                    g.ORDER_ID,
                    g.ORDER_PHONE,
                    g.ORDER_ADD,
                    g.ORDER_USERNAME,
                    g.ORDER_EMAIL,
                    g.ORDER_REMARK,
                    g.ODER_DATE,
                    g.ORDER_QUANTITY,
                    a.NEWS_ID,
                    a.NEWS_TITLE,
                    a.NEWS_CODE
                });


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #26
0
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                DateTime fromDate = ucFromDate.returnDate;
                DateTime toDate   = new DateTime(ucToDate.returnDate.Year, ucToDate.returnDate.Month, ucToDate.returnDate.Day, 23, 59, 59);

                var AllList = (from g in DB.ESHOP_GIFTs
                               from c in DB.ESHOP_CUSTOMERs
                               from user_gifts in DB.ESHOP_USER_GIFTs
                               where user_gifts.CUSTOMER_ID == c.CUSTOMER_ID && user_gifts.GIFT_ID == g.GIFT_ID &&
                               ("" == keyword ||
                                (c.CUSTOMER_FULLNAME).Contains(keyword)) &&
                               user_gifts.USER_GIFT_DATE <= toDate && user_gifts.USER_GIFT_DATE >= fromDate
                               orderby user_gifts.USER_GIFT_DATE descending
                               select new {
                    user_gifts.USER_GIFT_DATE,
                    user_gifts.USER_GIFT_ID,
                    user_gifts.USER_GIFT_STATUS,
                    user_gifts.USER_GIFT_QUANTITY,
                    c.CUSTOMER_FULLNAME
                }).Distinct();


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #27
0
        private void LoadGridItems()
        {
            try
            {
                var AllList = (from o in DB.ESHOP_USER_GIFTs
                               from g in DB.ESHOP_GIFTs
                               where o.USER_GIFT_ID == m_user_gift_id && o.GIFT_ID == g.GIFT_ID
                               select new
                {
                    o.GIFT_ID,
                    o.CUSTOMER_ID,
                    o.USER_GIFT_DATE,
                    o.USER_GIFT_ID,
                    o.USER_GIFT_QUANTITY,
                    o.USER_GIFT_STATUS,
                    g.GIFT_NAME,
                    g.GIFT_DESC
                });


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #28
0
    public void DeleteItem <T>(GridItemList <T> items) where T : GridBaseItem
    {
        if (_datas == null)
        {
            return;
        }
        if (_datas.Count <= 0)
        {
            return;
        }

        //没满就重写构造这个grid
        if (_datas.Count < itemCount)
        {
            _grid.CreateScrollView <T>(gameObject, _datas, items, parentUI);
        }
        else
        {
            UpdateItem();
        }
    }
        private void LoadGridItems()
        {
            try
            {
                var AllList = (from o in DB.ESHOP_ORDER_ITEMs
                               where o.ORDER_ID == m_order_id
                               orderby o.ESHOP_NEW.NEWS_TITLE descending
                               select new
                {
                    o.ITEM_ID,
                    o.ESHOP_NEW.NEWS_TITLE,
                    o.ITEM_QUANTITY,
                    o.ITEM_PRICE,
                    o.ITEM_SUBTOTAL,
                    o.ITEM_FIELD1,
                    o.ITEM_FIELD2
                });


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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
        private void SearchResult()
        {
            try
            {
                string keyword = txtKeyword.Value;

                var AllList = (from g in DB.ESHOP_NEWS_COMMENTs
                               where ("" == keyword || (g.COMMENT_NAME).Contains(keyword) || (g.COMMENT_EMAIL).Contains(keyword) || (g.COMMENT_CONTENT).Contains(keyword)) &&
                               g.NEWS_ID == m_news_id
                               orderby g.COMMENT_PUBLISHDATE descending
                               select g);

                var _vNewsComment = DB.GetTable <ESHOP_NEWS_COMMENT>().Where(a => a.NEWS_ID == m_news_id);
                foreach (var item in _vNewsComment)
                {
                    item.COMMENT_CHECK = 1;
                    DB.SubmitChanges();
                }

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

                GridItemList.DataSource = AllList;
                if (AllList.ToList().Count > GridItemList.PageSize)
                {
                    GridItemList.AllowPaging = true;
                }
                else
                {
                    GridItemList.AllowPaging = false;
                }
                GridItemList.DataBind();
            }
            catch (Exception ex)
            {
                clsVproErrorHandler.HandlerError(ex);
            }
        }
Example #31
0
	public override void OnLoadedUI(bool close3dTouch, object args) {
		base.OnLoadedUI(close3dTouch, args);
		_btnEmoji = transform.Find("L/botton1").gameObject;
		_btnItem = transform.Find("L/botton2").gameObject;
		_btnPet  = transform.Find("L/botton3").gameObject;
		_btnTask = transform.Find("L/botton4").gameObject;
		_btnHonor = transform.Find("L/botton5").gameObject;
		_btnQuickTalk = transform.Find("L/botton6").gameObject;
		_btnHistory = transform.Find("L/botton7").gameObject;

		_emojiPanel = transform.Find("R/Emoji");
		_gridEmoji = transform.Find("R/Emoji/Grid").GetComponent<UIGrid>();
		_emojiTemplate = transform.Find("R/Emoji/emoji_template").gameObject;
		_emojiTemplate.SetActive(false);
		_emojiGridList = new GridItemList<EmojiListItem>(null, this);

		_bagPanel = transform.Find("R/Bag");
		_btnAllItem = transform.Find("R/Bag/bottom1").gameObject;
		_btnPotionItem = transform.Find("R/Bag/bottom2").gameObject;
		_gridBag = transform.Find("R/Bag/Scroll View/Grid").GetComponent<UIGrid>();

		_petPanel = transform.Find("R/Pet");
		_gridPet = transform.Find("R/Pet/Grid").GetComponent<UIGrid>();
		_petTemplate = transform.Find("R/Pet/pet_template").gameObject;
		_petTemplate.SetActive(false);

		_taskPanel = transform.Find("R/quest");
		_gridTask = transform.Find("R/quest/Grid").GetComponent<UIGrid>();
		_taskTemplate = transform.Find("R/quest/quest_template").gameObject;
		_taskTemplate.SetActive(false);

		_honorPanel = transform.Find("R/chenghao");
		_gridHonor = transform.Find("R/chenghao/Grid").GetComponent<UIGrid>();
		_honorTemplate = transform.Find("R/chenghao/honor_template").gameObject;
		_honorTemplate.SetActive(false);
		

		_quickTalkPanel = transform.Find("R/massage");
		_gridTalk = transform.Find("R/massage/Grid").GetComponent<UIGrid>();
		_talkTemplate = transform.Find("R/massage/message_template").gameObject;

		_historyPanel = transform.Find("R/History");
		_gridHistory = transform.Find("R/History/Grid").GetComponent<UIGrid>();
		_historyTemplate = transform.Find("R/History/history_template").gameObject;
		_historyTemplate.SetActive(false);
		_historyGridList = new GridItemList<ChatHistoryItem>(null, this);
		_historyList = ChatDataManager.GetInstance().history;

		_parentUI = GetParentUI<ChatDetailView>();

		List<List<Transform>> contents = new List<List<Transform>>{
			new List<Transform>{_emojiPanel},new List<Transform>{_bagPanel},
			new List<Transform>{_petPanel},new List<Transform>{_taskPanel},
			new List<Transform>{_honorPanel},new List<Transform>{_quickTalkPanel},
			new List<Transform>{_historyPanel},
		};
		List<GameObject> activeButtons = new List<GameObject> {
			_btnEmoji,_btnItem,_btnPet,_btnTask,_btnHonor,
			_btnQuickTalk,_btnHistory,
		};
		_emojiNames = new List<string>();
		_emojiNames.Add("000_2");
		_emojiNames.Add("001_2");
		_emojiNames.Add("002_2");

		_gridEmoji.CreateScrollView<EmojiListItem>(_emojiTemplate, _emojiNames, _emojiGridList, GetParentUI<ChatDetailView>());

		UIWidgetTools.RegistUITapButton(activeButtons, contents);
		RegistUIButton(_btnHistory, (go) => {
			RefreshHistory();
		});

	}