add site
This commit is contained in:
70
Site/Maintenance/ScheduleDetail.aspx.cs
Normal file
70
Site/Maintenance/ScheduleDetail.aspx.cs
Normal file
@@ -0,0 +1,70 @@
|
||||
using Foresight.Fleet.Services.User;
|
||||
using IronIntel.Contractor;
|
||||
using IronIntel.Contractor.Maintenance;
|
||||
using IronIntel.Contractor.Site.Maintenance;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Maintenance_ScheduleDetail : PreventativeMaintenanceBasePage
|
||||
{
|
||||
protected string IID;
|
||||
protected string ScheduleType;
|
||||
protected PmScheduleInfo Schedule;
|
||||
protected string PmScheduleUom;
|
||||
public string CurrentDate = "";
|
||||
|
||||
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("PreventativeMaintenance");
|
||||
if (!license)
|
||||
RedirectToLoginPage();
|
||||
|
||||
bool permission = CheckRight(SystemParams.CompanyID, Feature.PREVENTATIVE_MAINTENANCE);
|
||||
if (!permission)
|
||||
RedirectToLoginPage();
|
||||
|
||||
IID = Request.QueryString["IID"];
|
||||
ScheduleType = Request.QueryString["TP"];
|
||||
if (!string.IsNullOrWhiteSpace(IID))
|
||||
{
|
||||
Schedule = MaintenanceManagement.GetPMScheduleByID(GetCurrentLoginSession().SessionID, IID);
|
||||
ScheduleType = Schedule.PmScheduleType;
|
||||
PmScheduleUom = Schedule.PmScheduleUom;
|
||||
}
|
||||
else
|
||||
{
|
||||
PmScheduleUom = SystemParams.GetStringParam("UnitOfOdometer");
|
||||
}
|
||||
if (string.IsNullOrWhiteSpace(ScheduleType))
|
||||
{
|
||||
ScheduleType = "PM";
|
||||
}
|
||||
else
|
||||
{
|
||||
ScheduleType = ScheduleType.ToUpper();
|
||||
}
|
||||
}
|
||||
}
|
||||
DateTime userlocaldate = SystemParams.ConvertToUserTimeFromUtc(GetCurrentLoginSession().User, DateTime.UtcNow);
|
||||
CurrentDate = userlocaldate.ToShortDateString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user