This commit is contained in:
59
source/WBI/ClientWorkorderView.aspx.cs
Normal file
59
source/WBI/ClientWorkorderView.aspx.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Configuration;
|
||||
using System.Collections;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using GZTW.AyaNova.BLL;
|
||||
|
||||
public partial class ClientWorkorderView : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
string idstring = Request.QueryString["id"];
|
||||
Guid oID = Guid.Empty;
|
||||
if (!string.IsNullOrEmpty(idstring))
|
||||
oID = new Guid(idstring);
|
||||
else
|
||||
throw new System.ApplicationException("ClientWorkorderView: Invalid ID param");
|
||||
|
||||
//Fetch the report to print
|
||||
object o = null;
|
||||
Report r = Report.GetItem(Util.IntegrationData.ClientWorkorderReportID);
|
||||
string key=r.ReportKey;
|
||||
|
||||
if (key == WorkorderServiceList.ReportKey)
|
||||
{
|
||||
//It's a summary workorder report
|
||||
o=WorkorderServiceList.GetListForSingleItem(oID);
|
||||
}
|
||||
else
|
||||
{
|
||||
//It's a detailed workorder report
|
||||
o = WorkorderServiceDetailedReportData.GetItem(oID);
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (o != null)
|
||||
{
|
||||
Cache.Insert(Util.CurrentUserID.ToString() + key,
|
||||
o,
|
||||
null, System.Web.Caching.Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(2));
|
||||
|
||||
string toUrl = "ReportView.aspx?rpt=" + r.ID + "&src=" + Util.CurrentUserID.ToString() + key;
|
||||
Response.Redirect(toUrl);
|
||||
}
|
||||
|
||||
else
|
||||
Response.Write("Nothing to report");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user