コード例 #1
0
ファイル: ContactForm.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();
            butSend.Text = AppEnv.GetDefaultLanguage() == "vi-VN" ? "Gửi đi" : "Send message";

            ShowInfo();
        }
コード例 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneLayout = ZoneDB.GetZoneLayout(_zonecurrent);

            if (zoneLayout.Length > 0)
            {
                switch (zoneLayout)
                {
                case "Layout_Zone_ClassRegister":
                    break;

                case "Layout_Zone_Khoahoc":
                case "Layout_Zone_Mamnon":
                    TuyenSinh_Home1.Visible     = true;
                    Search_Khoahoc1.Visible     = true;
                    Subcategory_2level1.Visible = true;
                    News_Sub1.Visible           = true;
                    break;

                case "Layout_Zone_Contact":
                    TuyenSinh_Home1.Visible = true;
                    CamNhan_Sub1.Visible    = true;
                    break;

                default:
                    TuyenSinh_Home1.Visible = true;
                    CamNhan_Sub1.Visible    = true;
                    Music_Home1.Visible     = true;
                    Video_RightSub1.Visible = true;
                    break;
                }
            }
        }
コード例 #3
0
ファイル: Album_List.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang: ";
                }
                else
                {
                    CollectionPager1.LabelText = "Page: ";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
コード例 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneInfo = ZoneDB.GetInfo(_zonecurrent);

            if (zoneInfo != null)
            {
                lnkZone.Text        = zoneInfo.Zone_Name;
                lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);
                var listStyle = zoneInfo.Zone_ContentListingDisplay;
                if (listStyle == "one")
                {
                    SpecialInZone1.Visible = false;
                    PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/NewsFocus.ascx"));
                }
                else
                {
                    PlaceHolder1.Controls.Add(Page.LoadControl("Project/TuyenSinhList.ascx"));
                }
            }
            else
            {
                Response.Redirect("/");
            }
        }
コード例 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();
            var source = ZoneDB.GetByParentID(_zonecurrent);

            if (source.Rows.Count == 0)
            {
                pntSub.Visible = false;

                var zoneInfo = ZoneDB.GetInfo(_zonecurrent);
                if (zoneInfo != null)
                {
                    pnZoneName.Visible = true;
                    litZoneName.Text   = zoneInfo.Zone_Name;
                    var listStyle = zoneInfo.Zone_ContentListingDisplay;
                    if (listStyle == "one")
                    {
                        PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/NewsFocus.ascx"));
                    }
                    else
                    {
                        PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/NewsList.ascx"));
                    }
                }
                else
                {
                    Response.Redirect("/");
                }
            }
            else
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
        }
コード例 #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent    = ZoneUtility.GetZoneCurrent();
            _excludeSpecial = ConvertUtility.ToInt32(SessionUtility.GetValue("excludeid"));

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang:&nbsp;";
                }
                else
                {
                    CollectionPager1.LabelText = "Page:&nbsp;";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
コード例 #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            zoneCurrent = ZoneUtility.GetZoneCurrent();

            lnkDownload.NavigateUrl = AppEnv.DownloadBrochure;

            rptData.DataSource = ZoneDB.GetByParentID(zoneCurrent);
            rptData.DataBind();
        }
コード例 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            zoneCurrent = ZoneUtility.GetZoneCurrent();

            zoneHome = ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneHome + AppEnv.GetLanguageFrontEnd()));

            rptData.DataSource = ZoneDB.GetZoneVisbleInMainNav();
            rptData.DataBind();
        }
コード例 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneKhoahoc =
                ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneKhoaHoc + AppEnv.GetLanguageFrontEnd()));

            lnkZoneName.NavigateUrl = UrlFilter.BuildUrlByZoneID(zoneKhoahoc);

            rptData.DataSource = ZoneDB.GetByParentID(zoneKhoahoc);
            rptData.DataBind();
        }
コード例 #10
0
ファイル: Zone.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneLayout = ZoneDB.GetZoneLayout(_zonecurrent);

            if (zoneLayout.Length > 0)
            {
                PlaceHolder1.Controls.Add(Page.LoadControl("Layout/" + zoneLayout + ".ascx"));
            }
            else
            {
                Response.Redirect("/");
            }
        }
コード例 #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();
            var dtData = DistributionDB.GetContentByZoneAndRankInZone(_zonecurrent, true, 0, (int)AppEnv.CMSContentRank.Special, 1);

            if (dtData.Rows.Count > 0)
            {
                rptData.DataSource = dtData;
                rptData.DataBind();
            }
            else
            {
                Visible = false;
            }
        }
コード例 #12
0
ファイル: Video_List.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            _itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]);

            _distInfo = DistributionDB.GetInfo(_itemid);
            if (_distInfo == null)
            {
                Visible = false;
                return;
            }

            DistributionDB.UpdateView(_distInfo.Distribution_ID, 1);

            _contentId = _distInfo.Distribution_ContentID;

            var contentInfo = ContentDB.GetInfo(_contentId);

            lnkName.Text        = contentInfo.Content_Name;
            lnkName.NavigateUrl = UrlFilter.BuildUrlByItemID(_itemid);



            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var strSQL = "SELECT CMS_ContentVideo.*, CMS_Videos.* FROM CMS_ContentVideo ";

            strSQL += " INNER JOIN CMS_Videos ON CMS_ContentVideo.Video_ID = CMS_Videos.Video_ID ";
            strSQL += " WHERE 1=1 ";

            strSQL += " AND CMS_ContentVideo.Content_ID=" + _contentId + " ";
            strSQL += " AND CMS_Videos.Video_Visible=1 ";
            strSQL += " ORDER BY CMS_ContentVideo.Priority ASC ";

            var source = DataHelper.GetDataFromTable(strSQL);

            if (source.Rows.Count > 0)
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
コード例 #13
0
ファイル: KhoaHoc_List.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            var source = DistributionDB.GetNewContentByZoneIDNoPage(_zoneCurrent, true, _excludeSpecial);

            if (source.Rows.Count > 0)
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
コード例 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var zoneInfo = ZoneDB.GetInfo(_zonecurrent);

            if (zoneInfo != null)
            {
                lnkZone.Text        = zoneInfo.Zone_Name;
                lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);
            }
            else
            {
                Response.Redirect("/");
            }
        }
コード例 #15
0
ファイル: SubCategory.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            zoneCurrent = ZoneUtility.GetZoneCurrent();
            var source = ZoneDB.GetByParentID(zoneCurrent);

            if (source.Rows.Count == 0)
            {
                var zoneparent = ZoneDB.GetParentID(zoneCurrent);
                if (zoneparent != 0)
                {
                    source = ZoneDB.GetByParentID(zoneparent);
                }
            }
            rptData.DataSource = source;
            rptData.DataBind();
        }
コード例 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            //lnkZone.Text = ZoneDB.GetZoneNameByID(zoneCurrent);
            //lnkZone.NavigateUrl = ZoneUtility.BuildUrlByZoneCurrent(zoneCurrent);

            DataTable dtSpecial = DistributionDB.GetContentByZoneIDAndRank(_zoneCurrent, 1, (int)AppEnv.CMSContentRank.Special);

            if (dtSpecial.Rows.Count > 0)
            {
                int contentID = Convert.ToInt32(dtSpecial.Rows[0]["Content_ID"]);
                //litName.Text = dtSpecial.Rows[0]["Content_Name"].ToString();
                litContent.Text = ContentDB.GetInfo(contentID).Content_Body;
            }
        }
コード例 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();
            var sql = "SELECT * FROM CMS_Zones ";

            sql += " WHERE 1=1 ";
            sql += " AND Zone_ParentID IN (SELECT Zone_ID FROM CMS_Zones WHERE Zone_ParentID=" + _zonecurrent + ") ";
            sql += " ORDER BY Zone_Priority ASC ";

            var source = DataHelper.GetDataFromTable(sql);

            if (source.Rows.Count > 0)
            {
                rptData.DataSource = source;
                rptData.DataBind();
            }
        }
コード例 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            const string position = "network";

            _zonecurrent = ZoneUtility.GetZoneCurrent();

            var positionid = ConvertUtility.ToInt32(PositionDB.GetIDByPosition(position));

            var source = AdvertiseDB.GetAvailables(positionid, _zonecurrent); //AdvertiseDB.GetLimitedAvailables(positionid, zonecurrent, 8);

            if (source.Rows.Count <= 0)
            {
                return;
            }

            rptData.DataSource = source;
            rptData.DataBind();
        }
コード例 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent        = ZoneUtility.GetZoneCurrent();
            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zonecurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zonecurrent);

            var source = ZoneDB.GetByParentID(_zonecurrent);

            if (source.Rows.Count > 0)
            {
                Subcategory_Full_2level1.Visible   = true;
                KhoaHoc_List1.Visible              = false;
                Subcategory_2level_Center1.Visible = true;
            }
            else
            {
                Subcategory_Full_2level1.Visible   = false;
                KhoaHoc_List1.Visible              = true;
                Subcategory_2level_Center1.Visible = false;
            }
        }
コード例 #20
0
        protected void Page_Load(object sender, EventArgs e)
        {
            _zonecurrent = ZoneUtility.GetZoneCurrent();

            litZoneName.Text = ZoneDB.GetZoneNameByID(_zonecurrent);
        }
コード例 #21
0
ファイル: Pix_List.ascx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            _zoneCurrent = ZoneUtility.GetZoneCurrent();

            _itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]);

            _distInfo = DistributionDB.GetInfo(_itemid);
            if (_distInfo == null)
            {
                Visible = false;
                return;
            }

            DistributionDB.UpdateView(_distInfo.Distribution_ID, 1);

            _contentId = _distInfo.Distribution_ContentID;

            var contentInfo = ContentDB.GetInfo(_contentId);

            lnkName.Text        = contentInfo.Content_Name;
            lnkName.NavigateUrl = UrlFilter.BuildUrlByItemID(_itemid);



            lnkZone.Text        = ZoneDB.GetZoneNameByID(_zoneCurrent);
            lnkZone.NavigateUrl = UrlFilter.BuildUrlByZoneID(_zoneCurrent);

            var strSQL = "SELECT CMS_ContentImage.*, CMS_Images.* FROM CMS_ContentImage ";

            strSQL += " INNER JOIN CMS_Images ON CMS_ContentImage.Image_ID = CMS_Images.Image_ID ";
            strSQL += " WHERE 1=1 ";

            strSQL += " AND CMS_ContentImage.Content_ID=" + _contentId + " ";
            strSQL += " AND CMS_Images.Image_Visible=1 ";
            strSQL += " ORDER BY CMS_ContentImage.Priority ASC ";

            var source = DataHelper.GetDataFromTable(strSQL);

            if (source.Rows.Count > 0)
            {
                CollectionPager1.DataSource    = source.DefaultView;
                CollectionPager1.BindToControl = rptData;

                if (AppEnv.GetLanguageFrontEnd() == "vi-VN")
                {
                    CollectionPager1.LabelText = "Trang:&nbsp;";
                }
                else
                {
                    CollectionPager1.LabelText = "Page:&nbsp;";
                }

                CollectionPager1.BackText              = "<<";
                CollectionPager1.PageNumbersSeparator  = "&nbsp;&nbsp;&nbsp;";
                CollectionPager1.BackNextLinkSeparator = "&nbsp;&nbsp;&nbsp;";

                rptData.DataSource = CollectionPager1.DataSourcePaged;
                rptData.DataBind();
            }
            else
            {
                rptData.Visible = false;
            }
        }
コード例 #22
0
ファイル: Default.aspx.cs プロジェクト: coltechvn/SolArt
        protected void Page_Load(object sender, EventArgs e)
        {
            litDescription.Text = "<meta name=\"description\" content=\"" + AppEnv.MetaDescription + "\">";
            litKeyword.Text     =
                "<meta name=\"keywords\" content=\"" + AppEnv.MetaSearch + "\">";

            AppEnv.GetLanguageFrontEnd();

            string jumpto = ConvertUtility.ToString(Request.QueryString["tab"]);

            switch (jumpto)
            {
            case "zone":
                PlaceHolder1.Controls.Add(Page.LoadControl("Layout/Zone.ascx"));
                break;

            case "content":
                PlaceHolder1.Controls.Add(Page.LoadControl("Layout/Content.ascx"));
                break;

            case "register":
                PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/Register_Member.ascx"));
                break;

            case "active":
                PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/Active_Member.ascx"));
                break;

            case "cart":
                PlaceHolder1.Controls.Add(Page.LoadControl("UserControls/Cart.ascx"));
                break;

            default:
                PlaceHolder1.Controls.Add(Page.LoadControl("Layout/Home.ascx"));
                Pageclass               = "banner_wrap";
                Column_Right1.Visible   = false;
                TuyenSinh_Home1.Visible = true;
                Home_AloneArea1.Visible = true;
                break;
            }

            int itemid = ConvertUtility.ToInt32(Request.QueryString["itemid"]);

            if (itemid != 0)
            {
                switch (jumpto)
                {
                case "tab":
                    litWebTitle.Text = defaultTitle + " - " + DistributionDB.GetNameByDistID(itemid);
                    break;

                default:
                    litWebTitle.Text = defaultTitle;
                    break;
                }
            }
            else
            {
                int zonecurrent = ZoneUtility.GetZoneCurrent();

                if (zonecurrent == 0)
                {
                    litWebTitle.Text = defaultTitle;
                }
                else
                {
                    litWebTitle.Text = defaultTitle + " - " + ZoneDB.GetZoneNameByID(zonecurrent);
                }
            }
        }