diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj index 80bde48..f3b86ab 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Mesnac.Action.ChemicalWeighing.csproj @@ -754,6 +754,7 @@ + diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs index 75ee7c7..da9f1a0 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs @@ -5,9 +5,12 @@ using ICSharpCode.Core; using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.InterfaceDocking; using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity; +using Mesnac.Action.ChemicalWeighing.Util; +using Mesnac.Basic; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; using Mesnac.Core.Service; +using Steema.TeeChart.Styles; using System; using System.Collections.Generic; using System.Data; diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/UserJudge.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/UserJudge.cs new file mode 100644 index 0000000..d0ffdab --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/UserJudge.cs @@ -0,0 +1,39 @@ +using DevExpress.DataProcessing; +using Mesnac.Basic; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mesnac.Action.ChemicalWeighing.Util +{ + public class UserJudge + { + /// + /// 判断是否为超级用户 + /// + /// true为超级用户,false为普通Run环境用户 + public static bool IsEdit() + { + string userName = UserInfo.Instance.UserName; + if(userName == "mesnac" || string.IsNullOrEmpty(userName)) + { + return true; + } + else + { + return false; + } + } + + /// + /// 判断是否为超级用户 + /// + /// true为普通Run环境用户,false为超级用户 + public static bool IsNormalUser() + { + return !IsEdit(); + } + } +}