add site
This commit is contained in:
56
Site/JobSite/JobSiteRequirements.aspx.cs
Normal file
56
Site/JobSite/JobSiteRequirements.aspx.cs
Normal file
@@ -0,0 +1,56 @@
|
||||
using Foresight.Fleet.Services.User;
|
||||
using IronIntel.Contractor;
|
||||
using IronIntel.Contractor.Site.JobSite;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class JobSiteRequirements : JobSiteRequirementsBasePage
|
||||
{
|
||||
public string CurrentDate = "";
|
||||
protected bool CanConfig = false;
|
||||
protected string LatestStartDate = "";
|
||||
protected bool IsReadOnly = false;
|
||||
protected bool IsRequestOnly = false;
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string methodName = Request.Form["MethodName"];
|
||||
if (!string.IsNullOrEmpty(methodName))
|
||||
{
|
||||
ProcessRequest();
|
||||
}
|
||||
else if (!IsPostBack)
|
||||
{
|
||||
Title = PageTitle;
|
||||
if (CheckLoginSession())
|
||||
{
|
||||
bool license = SystemParams.HasLicense("JobSites");
|
||||
bool license1 = SystemParams.HasLicense("JobsiteDispatch");
|
||||
if (!license || !license1)
|
||||
RedirectToEntryPage();
|
||||
|
||||
bool permission = CheckRight(SystemParams.CompanyID, Feature.JOB_SITES_REQUIREMENTS);
|
||||
if (!permission)
|
||||
RedirectToLoginPage();
|
||||
|
||||
IsReadOnly = CheckReadonly(SystemParams.CompanyID, Feature.JOB_SITES_REQUIREMENTS);
|
||||
IsRequestOnly = CheckRequestonly(SystemParams.CompanyID);
|
||||
}
|
||||
}
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
LatestStartDate = userlocaldate.ToShortDateString();
|
||||
CurrentDate = userlocaldate.ToShortDateString();
|
||||
}
|
||||
|
||||
protected override int FeatureID
|
||||
{
|
||||
get
|
||||
{
|
||||
return Foresight.Fleet.Services.User.Feature.JOB_SITES_REQUIREMENTS;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user