add site
This commit is contained in:
47
Site/Maintenance/WorkOrderHistory.aspx.cs
Normal file
47
Site/Maintenance/WorkOrderHistory.aspx.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using Foresight.Fleet.Services.User;
|
||||
using IronIntel.Contractor;
|
||||
using IronIntel.Contractor.Site.Maintenance;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class WorkOrderHistory : WorkOrderBasePage
|
||||
{
|
||||
protected string IID;
|
||||
public bool IsDealer = IronIntel.Contractor.SystemParams.IsDealer;
|
||||
public string BeginDate = "";
|
||||
public string EndDate = "";
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!CheckLoginSession())
|
||||
{
|
||||
// TODO: sub page
|
||||
//RedirectToLoginPage();
|
||||
}
|
||||
else
|
||||
{
|
||||
string methodName = Request.Form["MethodName"];
|
||||
if (!string.IsNullOrEmpty(methodName))
|
||||
{
|
||||
ProcessRequest(methodName);
|
||||
}
|
||||
else if (!IsPostBack)
|
||||
{
|
||||
bool license = SystemParams.HasLicense("WorkOrder");
|
||||
if (!license)
|
||||
RedirectToLoginPage();
|
||||
bool permission = CheckRight(SystemParams.CompanyID, Feature.WORKORDERHISTORY);
|
||||
if (!permission)
|
||||
RedirectToLoginPage();
|
||||
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
BeginDate = userlocaldate.AddMonths(-1).ToShortDateString();
|
||||
EndDate = userlocaldate.ToShortDateString();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user