예제 #1
0
파일: DelLog.aspx.cs 프로젝트: ttrr1/Midea
    protected void Page_Load(object sender, EventArgs e)
    {
        ManageHelper.CheckAdminLogin();
        ManageHelper.CheckAdminPower("system_databasedellog");
        if (ManageHelper.PageAct() != "del")
        {
            return;
        }
        ManageHelper.CheckAdminPower("system_databasedellog");
        var db = new Sys.BLL.Common();


        try
        {
            db.DatabaseLogDel();
            Response.Write("yes");
            ManageHelper.AddLog("system_databasedellog", "清除数据库日志成功");
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
            ManageHelper.AddLog("system_databasedellog", "清除数据库日志失败");
            Response.End();
        }


        Response.End();
    }
예제 #2
0
파일: Backup.aspx.cs 프로젝트: ttrr1/Midea
    protected void Page_Load(object sender, EventArgs e)
    {
        ManageHelper.CheckAdminLogin();
        ManageHelper.CheckAdminPower("system_databasebackup");

        if (ManageHelper.PageAct() != "bak")
        {
            return;
        }
        WebConfig.SetString("DatabaseBackupPath", DatabaseBackupPath);

        var db = new Sys.BLL.Common();

        try
        {
            var bakfile = db.DatabaseBackup(DatabaseBackupPath);
            Response.Write("yes");
            ManageHelper.AddLog("system_databasebackup", "数据库备份成功,路径:" + bakfile);
        }
        catch (Exception ex)
        {
            Response.Write(ex.Message);
            ManageHelper.AddLog("system_databasebackup", "数据库备份失败,路径:" + DatabaseBackupPath);
            Response.End();
        }


        Response.End();
    }
예제 #3
0
파일: System.aspx.cs 프로젝트: ttrr1/Midea
 protected void Page_Load(object sender, EventArgs e)
 {
     ManageHelper.CheckAdminLogin();
     ManageHelper.CheckAdminPower("system_configsystem");
     if (ManageHelper.PageAct() == "save")
     {
         ConfigSave();
     }
 }
예제 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ManageHelper.CheckAdminLogin();
     ManageHelper.CheckAdminPower("system_toolcache");
     if (ManageHelper.PageAct() == "clear")
     {
         foreach (var entry in base.Cache.Cast <DictionaryEntry>())
         {
             DataCache.RemoveCache(entry.Key.ToString());
         }
         Response.Write("yes");
         Response.End();
     }
 }
예제 #5
0
    public string CurPageFlag = "system_adminipblockconfig";          //当前模块权限
    protected void Page_Load(object sender, EventArgs e)
    {
        ManageHelper.CheckAdminLogin();

        ManageHelper.CheckAdminPower(CurPageFlag);
        var bll = new Sys.BLL.SysConfig();

        if (ManageHelper.PageAct() == "save")
        {
            ManageHelper.CheckAdminPower("system_memberipblockconfigupdate");//修改权限
            var model = bll.GetModel("WebConfig", "AdminIpBlockType");
            model.Value = PageRequest.GetString("IpBlockType");
            bll.Update(model);
            //添加日志
            ManageHelper.AddLog(CurPageFlag, (BlockModule == 0 ? "后台" : "用户") + "访问限制选项修改为:“" + Sys.BLL.SysConfig.GetNameByCache("IpBlockType", PageRequest.GetString("IpBlockType")) + "”");

            Response.Write("yes");
            Response.End();
        }
    }