protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { ZoneUtility.LoadZones(dropZoneHome.Items); foreach (ListItem item in dropZoneHome.Items) { //lstZones.Items.Add(new ListItem(item.Text,item.Value)); //lstZonesSmall.Items.Add(new ListItem(item.Text, item.Value)); dropClassRegister.Items.Add(new ListItem(item.Text, item.Value)); dropKhoaHoc.Items.Add(new ListItem(item.Text, item.Value)); } } dropZoneHome.SelectedIndex = -1; MiscUtility.SetSelected(dropZoneHome.Items, SettingDB.GetValue(AppEnv.CMS_ZoneHome + AppEnv.GetLanguage())); dropClassRegister.SelectedIndex = -1; MiscUtility.SetSelected(dropClassRegister.Items, SettingDB.GetValue(AppEnv.CMS_ZoneClassRegister + AppEnv.GetLanguage())); dropKhoaHoc.SelectedIndex = -1; MiscUtility.SetSelected(dropKhoaHoc.Items, SettingDB.GetValue(AppEnv.CMS_ZoneKhoaHoc + AppEnv.GetLanguage())); //if (!IsPostBack) //{ // string zoneFocus = "|" + SettingDB.GetValue(Constants.CMS_ZoneHomeFocus + AppEnv.GetLanguage()); // lstZoneFocus.Items.Clear(); // foreach (ListItem item in lstZones.Items) if (zoneFocus.IndexOf("|" + item.Value + "|") >= 0) lstZoneFocus.Items.Add(new ListItem(item.Text, item.Value)); // string zoneSmallFocus = "|" + SettingDB.GetValue(Constants.CMS_ZoneSmallFocus + AppEnv.GetLanguage()); // lstZonesSmallFocus.Items.Clear(); // foreach (ListItem itemS in lstZonesSmall.Items) if (zoneSmallFocus.IndexOf("|" + itemS.Value + "|") >= 0) lstZonesSmallFocus.Items.Add(new ListItem(itemS.Text, itemS.Value)); //} }
protected void Page_Load(object sender, EventArgs e) { _contentid = ConvertUtility.ToInt32(Request.QueryString["contentid"]); //mydealInfo = MydealItemDB.GetInfo(_contentid); if (!IsPostBack) { ZoneUtility.LoadZonesByParentID(dropLopHoc.Items, ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneKhoaHoc + AppEnv.GetLanguage()))); dropLopHoc.Items.Insert(0, new ListItem("Lựa chọn lớp học", "0")); chklMonHoc.DataSource = MonhocDB.GetAll(); chklMonHoc.DataTextField = "Monhoc_Name"; chklMonHoc.DataValueField = "Monhoc_ID"; chklMonHoc.DataBind(); chklCoso.DataSource = CosoDB.GetAll(); chklCoso.DataTextField = "Coso_Name"; chklCoso.DataValueField = "Coso_ID"; chklCoso.DataBind(); chkVisible.Checked = true; } lblStatusUpdate.Text = string.Empty; }
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("/"); } }
protected void Page_Load(object sender, EventArgs e) { _zonecurrent = ZoneUtility.GetZoneCurrent(); butSend.Text = AppEnv.GetDefaultLanguage() == "vi-VN" ? "Gửi đi" : "Send message"; ShowInfo(); }
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; } } }
protected void Page_Load(object sender, EventArgs e) { _dotuoi = ConvertUtility.ToString(Request.QueryString["dt"]); _monhoc = ConvertUtility.ToString(Request.QueryString["mh"]); _coso = ConvertUtility.ToString(Request.QueryString["cs"]); _lophoc = ConvertUtility.ToString(Request.QueryString["lh"]); _khoahocid = ConvertUtility.ToInt32(Request.QueryString["khoahocid"]); if (!IsPostBack) { MiscUtility.FillIndex(dropDay, 1, 31, DateTime.Now.Day); MiscUtility.FillIndex(dropMonth, 1, 12, DateTime.Now.Month); MiscUtility.FillIndex(dropYear, 1950, DateTime.Now.Year, DateTime.Now.Year); dropFilterMonHoc.DataSource = MonhocDB.GetAll(); dropFilterMonHoc.DataTextField = "Monhoc_Name"; dropFilterMonHoc.DataValueField = "Monhoc_ID"; dropFilterMonHoc.DataBind(); dropFilterMonHoc.Items.Insert(0, new ListItem("Chọn môn học", "")); dropFilterCoso.DataSource = CosoDB.GetAll(); dropFilterCoso.DataTextField = "Coso_Name"; dropFilterCoso.DataValueField = "Coso_ID"; dropFilterCoso.DataBind(); dropFilterCoso.Items.Insert(0, new ListItem("Chọn cơ sở", "")); ZoneUtility.LoadZonesByParentID(dropFilterLopHoc.Items, ConvertUtility.ToInt32(SettingDB.GetValue(AppEnv.CMS_ZoneKhoaHoc + AppEnv.GetLanguage()))); dropFilterLopHoc.Items.Insert(0, new ListItem("Chọn lớp học", "")); MiscUtility.SetSelected(dropFilterDoTuoi.Items, _dotuoi); MiscUtility.SetSelected(dropFilterMonHoc.Items, _monhoc); MiscUtility.SetSelected(dropFilterLopHoc.Items, _lophoc); MiscUtility.SetSelected(dropFilterCoso.Items, _coso); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (ConvertUtility.ToBoolean(AppEnv.AdvInZone)) { ZoneUtility.LoadZones(lstZones.Items); lstZones.Enabled = true; lstZones.Items.Insert(0, new ListItem("Root 0", "0")); } else { lstZones.Items.Insert(0, new ListItem("Root 0", "0")); lstZones.Enabled = false; lstZones.SelectedIndex = 0; } lstPositions.DataSource = PositionDB.GetAll(); lstPositions.DataTextField = "Pos_Name"; lstPositions.DataValueField = "Pos_ID"; lstPositions.DataBind(); SelectDate1.SetDate(DateTime.Now); SelectDate2.SetDate(DateTime.Now.AddYears(1)); } txtPath.fpUploadDir = AppEnv.UploadAdvertise; }
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: "; } else { CollectionPager1.LabelText = "Page: "; } CollectionPager1.BackText = "<<"; CollectionPager1.PageNumbersSeparator = " "; CollectionPager1.BackNextLinkSeparator = " "; rptData.DataSource = CollectionPager1.DataSourcePaged; rptData.DataBind(); } else { rptData.Visible = false; } }
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 = " "; CollectionPager1.BackNextLinkSeparator = " "; rptData.DataSource = CollectionPager1.DataSourcePaged; rptData.DataBind(); } else { rptData.Visible = false; } }
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(); } }
protected void Page_Load(object sender, EventArgs e) { dtgUsers.DataSource = UserDB.GetAll(); dtgUsers.DataBind(); if (!IsPostBack) { ZoneUtility.LoadZones(lstCMSRoles.Items); } }
protected void Page_Load(object sender, EventArgs e) { zoneCurrent = ZoneUtility.GetZoneCurrent(); lnkDownload.NavigateUrl = AppEnv.DownloadBrochure; rptData.DataSource = ZoneDB.GetByParentID(zoneCurrent); rptData.DataBind(); }
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(); }
private void LoadZones() { if (isManager) { ZoneUtility.LoadZones(dropZones.Items); } else { ZoneUtility.LoadZones(dropZones.Items, CurrentAdminInfo.User_ID); } MiscUtility.SetSelected(dropZones.Items, AppEnv.ZoneSelected.ToString()); }
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(); }
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; } }
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("/"); } }
private void LoadZones() { ZoneUtility.LoadZones(dropZones.Items); lstZones.DataSource = ZoneDB.GetStandAloneBox(); lstZones.DataValueField = "Zone_ID"; lstZones.DataTextField = "Zone_Name"; lstZones.DataBind(); lstZones.Items.Insert(0, new ListItem("Root", "0")); MiscUtility.SetSelected(lstZones.Items, zoneSelected.ToString()); lstZones_SelectedIndexChanged(null, null); }
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; } }
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; } }
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(); }
private void LoadZones() { ZoneUtility.LoadZones(lstZones.Items); lstZones.Items.Insert(0, new ListItem("Root", "0")); dropZones.Items.Clear(); foreach (ListItem item in lstZones.Items) { dropZones.Items.Add(new ListItem(item.Text, item.Value)); } MiscUtility.SetSelected(lstZones.Items, zoneSelected.ToString()); lstZones_SelectedIndexChanged(null, null); }
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("/"); } }
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; } }
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(); } }
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(); }
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; } }
private void LoadZones() { lstZones.Enabled = false; if (isManager) { ZoneUtility.LoadZones(dropZones.Items); } else { ZoneUtility.LoadZones(dropZones.Items, CurrentAdminInfo.User_ID); } if (isManager || isDeployer) { lstZones.Enabled = true; } lstZones.Items.Clear(); foreach (ListItem item in dropZones.Items) { lstZones.Items.Add(new ListItem(item.Text, item.Value)); } }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (ConvertUtility.ToBoolean(AppEnv.AdvInZone)) { ZoneUtility.LoadZones(lstZones.Items); lstZones.Enabled = true; } else { lstZones.Enabled = false; } lstZones.Items.Insert(0, new ListItem("Root 0", "0")); lstZones.SelectedIndex = 0; lstPositions.DataSource = PositionDB.GetAll(); lstPositions.DataTextField = "Pos_Name"; lstPositions.DataValueField = "Pos_ID"; lstPositions.DataBind(); lstPositions.SelectedIndex = -1; MiscUtility.SetSelected(lstPositions.Items, PosSelected.ToString()); } lblUpdateStatus.Text = string.Empty; }
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); } } }