20023-08-10

This commit is contained in:
2023-08-10 11:40:02 +08:00
parent c41b3b9777
commit 02fcf5be10
82 changed files with 9031 additions and 2997 deletions
@@ -27,6 +27,11 @@ namespace FineUIPro.Web.SysManage
//{
// this.btnArrowRefresh.Hidden = false;
//}
if (this.CurrUser.UserId == Const.hfnbdId)
{
this.TabHttpLog.Hidden = false;
this.TabOnlineMenuSet.Hidden = false;
}
/// TAB1加载页面方法
this.LoadTab1Data();
ConstValue.InitConstValueDropDownList(this.drpSuperMenu, this.rblMenuType.SelectedValue, true);
@@ -34,6 +39,7 @@ namespace FineUIPro.Web.SysManage
this.LoadTab2Data();
/// TAB2加载页面方法
this.LoadTab3Data();
LoadTabOnlineEditData();
}
}
#region
@@ -367,6 +373,14 @@ namespace FineUIPro.Web.SysManage
{
txtSerVerUrl.Text = sysSet9.SetValue;
}
var sysSet18 = BLL.ConstValue.drpConstItemList(BLL.ConstValue.Group_SafeReferer).Select(x => new { x.ConstText, x.ConstValue }).ToList();
var txtReferer = "";
foreach (var item in sysSet18)
{
string a = item.ConstText + "|" + item.ConstValue;
txtReferer += a + "&";
}
txtRefererWhitelist.Text = txtReferer;
}
/// <summary>
@@ -567,6 +581,26 @@ namespace FineUIPro.Web.SysManage
Funs.DB.Sys_Set.InsertOnSubmit(newSysSet9);
Funs.DB.SubmitChanges();
}
ConstValue.DeleteConstValueBygroupId(BLL.ConstValue.Group_SafeReferer);
var q = txtRefererWhitelist.Text.Split('&');
foreach (var item in q)
{
var detail = item.Split('|');
if (detail.Length == 2)
{
Model.Sys_Const newSys_Const = new Model.Sys_Const()
{
ID = SQLHelper.GetNewID(typeof(Model.Sys_Const)),
ConstText = detail[0].ToString(),
ConstValue = detail[1].ToString(),
SortIndex = 1,
GroupId = ConstValue.Group_SafeReferer
};
Funs.DB.Sys_Const.InsertOnSubmit(newSys_Const);
Funs.DB.SubmitChanges();
}
}
ShowNotify("保存成功!", MessageBoxIcon.Success);
BLL.LogService.AddSys_Log(this.CurrUser, "修改系统环境设置!", string.Empty, BLL.Const.SysConstSetMenuId, BLL.Const.BtnModify);
}
@@ -942,6 +976,93 @@ namespace FineUIPro.Web.SysManage
}
#endregion
#region TabOnLine加载页面方法
private void LoadTabOnlineEditData()
{
var db = Funs.DB;
var sysSet1 = (from x in db.Sys_Const where x.ConstText == "OnlineEditAppid" select x).ToList().FirstOrDefault();
if (sysSet1 != null)
{
txtAppid.Text = sysSet1.ConstValue;
}
var sysSet2 = (from x in db.Sys_Const where x.ConstText == "OnlineEditAppkey" select x).ToList().FirstOrDefault();
if (sysSet2 != null)
{
txtAppkey.Text = sysSet2.ConstValue;
}
var sysSet3 = (from x in db.Sys_Const where x.ConstText == "OnlineEditCallBackurl" select x).ToList().FirstOrDefault();
if (sysSet3 != null)
{
txtCallBackapiurl.Text = sysSet3.ConstValue;
}
}
protected void OnlineMenuSetSave_OnClick(object sender, EventArgs e)
{
var db = Funs.DB;
Model.Sys_Const sysSey1 = db.Sys_Const.FirstOrDefault(x => x.ConstText == "OnlineEditAppid");
if (sysSey1 != null)
{
if (!string.IsNullOrEmpty(this.txtAppid.Text.Trim()))
{
sysSey1.ConstValue = this.txtAppid.Text.Trim();
}
db.SubmitChanges();
}
else
{
sysSey1 = new Model.Sys_Const();
if (!string.IsNullOrEmpty(this.txtAppid.Text.Trim()))
{
sysSey1.ConstValue = this.txtAppid.Text.Trim();
}
sysSey1.ConstText = "OnlineEditAppid";
Funs.DB.Sys_Const.InsertOnSubmit(sysSey1);
Funs.DB.SubmitChanges();
}
Model.Sys_Const sysSey2 = db.Sys_Const.FirstOrDefault(x => x.ConstText == "OnlineEditAppkey");
if (sysSey2 != null)
{
if (!string.IsNullOrEmpty(this.txtAppkey.Text.Trim()))
{
sysSey2.ConstValue = this.txtAppkey.Text.Trim();
}
db.SubmitChanges();
}
else
{
sysSey2 = new Model.Sys_Const();
if (!string.IsNullOrEmpty(this.txtAppkey.Text.Trim()))
{
sysSey2.ConstValue = this.txtAppkey.Text.Trim();
}
sysSey2.ConstText = "OnlineEditAppkey";
Funs.DB.Sys_Const.InsertOnSubmit(sysSey2);
Funs.DB.SubmitChanges();
}
Model.Sys_Const sysSet3 = db.Sys_Const.FirstOrDefault(x => x.ConstText == "OnlineEditCallBackurl");
if (sysSet3 != null)
{
if (!string.IsNullOrEmpty(this.txtCallBackapiurl.Text.Trim()))
{
sysSet3.ConstValue = this.txtCallBackapiurl.Text.Trim();
}
db.SubmitChanges();
}
else
{
sysSet3 = new Model.Sys_Const();
if (!string.IsNullOrEmpty(this.txtCallBackapiurl.Text.Trim()))
{
sysSet3.ConstValue = this.txtCallBackapiurl.Text.Trim();
}
sysSet3.ConstText = "OnlineEditCallBackurl";
Funs.DB.Sys_Const.InsertOnSubmit(sysSet3);
Funs.DB.SubmitChanges();
}
}
#endregion
/// <summary>
/// 选择菜单类型
/// </summary>