rbac修改与删除之前的简单rbac

This commit is contained in:
2025-04-08 16:17:34 +08:00
parent 9f7c6206ca
commit 3401a3b254
7 changed files with 27 additions and 245 deletions

View File

@ -1,5 +1,7 @@
using System;
using System.Data.Entity;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;
using AntdUI;
using DH.Commons.Base;
@ -13,17 +15,21 @@ using DH.RBAC.Utility.Other;
using DHSoftware.Utils;
using DHSoftware.Views;
using Microsoft.VisualBasic.Logging;
using Newtonsoft.Json;
using GlobalConfig = DH.RBAC.Common.GlobalConfig;
namespace DHSoftware
{
internal static class Program
{
private static MainWindow mainWindow;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main()
{
// 必须在第一个窗口创建前调用以下两行
@ -46,10 +52,11 @@ namespace DHSoftware
UpdateStep(10, "正在加载数据库", true);
try
{
MyConfig config = File.ReadAllText(MyEnvironment.RootPath("Configs/config.json")).ToObject<MyConfig>();
MyConfig config = File.ReadAllText(MyEnvironment.RootPath("db/config.json")).ToObject<MyConfig>();
GlobalConfig.Config = config;
string message = "";
bool flag = BaseLogic.InitDB(config.DbType, config.DbHost, config.DbName, config.DbUserName, config.DbPassword, ref message);
if (!flag)
{
Console.Write(message);