protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // Kiểm tra quyền admin
                Title = Resources.titleAdminAgentList;
                RepeaterArticles.DataSource = Module.RoleGetAll();
                RepeaterArticles.DataBind();
                //labelUserCount.Text = string.Format(Resources.stringFormatUserCount, Module.UserCount());

                //if (!IsPostBack)
                //{
                //    if (Module.ModuleSettings("AgencySupplement") != null)
                //    {
                //        txtSingle.Text = Module.ModuleSettings("AgencySupplement").ToString();
                //    }
                //    else
                //    {
                //        txtSingle.Text = "0";
                //    }
                //}
            }
            catch (Exception ex)
            {
                _logger.Error("Error when Page_Load in AgentList", ex);
                ShowError(ex.Message);
            }
        }
Ejemplo n.º 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                // Kiểm tra quyền admin
                if (!UserIdentity.HasPermission(AccessLevel.Administrator))
                {
                    panelContent.Visible = false;
                    ShowError(Resources.stringAccessDenied);
                    return;
                }
                Title = Resources.titleAdminAgentList;
                RepeaterArticles.DataSource = Module.RoleGetAll();
                RepeaterArticles.DataBind();
                labelUserCount.Text = string.Format(Resources.stringFormatUserCount, Module.UserCount());

                if (!IsPostBack)
                {
                    if (Module.ModuleSettings("AgencySupplement") != null)
                    {
                        txtSingle.Text = Module.ModuleSettings("AgencySupplement").ToString();
                    }
                    else
                    {
                        txtSingle.Text = "0";
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.Error("Error when Page_Load in AgentList", ex);
                ShowError(ex.Message);
            }
        }
Ejemplo n.º 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     // Kiểm tra quyền admin
     if (!UserIdentity.HasPermission(AccessLevel.Administrator))
     {
         panelContent.Visible = false;
         ShowError(Resources.textAccessDenied);
         return;
     }
     Title = Resources.titleAdminAgentList;
     RepeaterArticles.DataSource = Module.RoleGetAll();
     RepeaterArticles.DataBind();
     labelUserCount.Text = string.Format(Resources.stringFormatUserCount, Module.UserCount());
 }