fleet-contractor/Site/Security/AddUser.aspx.cs
2023-04-28 12:22:26 +08:00

55 lines
1.7 KiB
C#

using Foresight.Fleet.Services.User;
using IronIntel.Contractor;
using IronIntel.Contractor.Site;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
public partial class AddUser : UserManageBasePage
{
protected string IID;
public bool IsDealer = IronIntel.Contractor.SystemParams.IsDealer;
public bool EmailSubscribe = false;
public bool AllowSMSMessagesLisence = false;
public bool AllowSMSMessagesFeature = false;
protected string SystemLoginVerifyType = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!CheckLoginSession())
{
RedirectToLoginPage();
}
else
{
string methodName = Request.Form["MethodName"];
if (!string.IsNullOrEmpty(methodName))
{
ProcessRequest(methodName);
}
else if (!IsPostBack)
{
this.Title = PageTitle;
IID = GetCurrentLoginSession().User.UID;
EmailSubscribe = SystemParams.HasLicense("EmailSubscribe");
AllowSMSMessagesLisence = SystemParams.HasLicense("WorkOrder");
AllowSMSMessagesFeature = CheckRight(SystemParams.CompanyID, Feature.WORK_ORDER);
}
var LoginVerifyType = SystemParams.GetStringParam("LoginVerifyType");
SystemLoginVerifyType = string.IsNullOrEmpty(LoginVerifyType) ? "(None)" : "(" + LoginVerifyType + ")";
}
}
public bool IsSupperAdmin
{
get
{
var user = GetCurrentUser();
return user.UserType == IronIntel.Contractor.Users.UserTypes.SupperAdmin;
}
}
}