private void NavigationTitle(int type) { SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO(); SYS_WidgetType _widgetType = _widgetTypeBSO.GetSYS_WidgetTypeById(Convert.ToInt32(Request["type"].ToString())); if (_widgetType != null) { litModules.Text = "Cấu hình " + _widgetType.WidgetTypeName; } }
private void NavigationTitle(int type) { //imgIcon.ImageUrl = "~/images/Admin_Theme/Icons/icon-32-config.png"; SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO(); SYS_WidgetType _widgetType = _widgetTypeBSO.GetSYS_WidgetTypeById(Convert.ToInt32(Request["type"].ToString())); if (_widgetType != null) { litModules.Text = "Cấu hình " + _widgetType.WidgetTypeName; } }
protected void Page_Load(object sender, EventArgs e) { HttpCookie cookie_lang = Request.Cookies["LangInfo_CMS"]; if (cookie_lang == null || cookie_lang["Lang"] == null || cookie_lang["Lang"] == string.Empty) { cookie_lang = new HttpCookie("LangInfo_CMS"); cookie_lang["Lang"] = "vi-VN"; cookie_lang.Expires = DateTime.Now.AddDays(1); Response.Cookies.Add(cookie_lang); } Language.language = cookie_lang["Lang"].ToString(); Session["Lang"] = cookie_lang["Lang"].ToString(); Config config = new Config(); if (AspNetCache.CheckCache("Config_" + Language.language) == false) { ConfigBSO configBSO = new ConfigBSO(); config = configBSO.GetAllConfig(Language.language); AspNetCache.SetCacheWithTime("Config_" + Language.language, config, 150); } else { config = (Config)AspNetCache.GetCache("Config_" + Language.language); } Page.Title = config.Titleweb; if (!string.IsNullOrEmpty(Request["type"])) { SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO(); SYS_WidgetType _widgetType = _widgetTypeBSO.GetSYS_WidgetTypeById(Convert.ToInt32(Request["type"].ToString())); if (_widgetType != null) { if (_widgetType.WidgetControl != "") { PlaceHolder1.Controls.Add(LoadControl(ResolveUrl("~") + _widgetType.WidgetDir + "/" + _widgetType.WidgetControl)); } } } }
protected void initControl(int ID) { if (ID > 0) { txtID.Value = Convert.ToString(ID); btn_add.Visible = false; btn_edit.Visible = true; btn_add1.Visible = false; btn_add2.Visible = false; btn_edit1.Visible = true; try { SYS_WidgetTypeBSO _widgetTypeBSO = new SYS_WidgetTypeBSO(); SYS_WidgetType _widgetType = _widgetTypeBSO.GetSYS_WidgetTypeById(ID); txtWidgetTypeName.Text = _widgetType.WidgetTypeName; GetFile(); dropControl.SelectedValue = _widgetType.WidgetControl; hddDir.Value = _widgetType.WidgetDir; txtInfo.Text = _widgetType.WidgetInfo; chkStatus.Checked = _widgetType.WidgetStatus; hddOrders.Value = _widgetType.Orders.ToString(); } catch (Exception ex) { error.Text = ex.Message.ToString(); } } else { GetFile(); txtID.Value = ""; btn_add.Visible = true; btn_edit.Visible = false; btn_add1.Visible = true; btn_add2.Visible = true; btn_edit1.Visible = false; } }