This commit is contained in:
2018-06-29 19:47:36 +00:00
commit be7f501333
3769 changed files with 1425961 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
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;
namespace AyaNovaMBI
{
public partial class sched2labor : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
Guid id = util.GetIDFromRequest(Request);
WorkorderServiceScheduledUserList.WorkorderServiceScheduledUserListInfo i;
try
{
i = WorkorderServiceScheduledUserList.GetListForSingleItem(id)[0];
}
catch
{
throw new ApplicationException("Workorder item scheduled user ID is not valid, WorkorderServiceScheduledUserListInfo could not be retrieved");
}
//convert
Workorder w = Workorder.GetWorkorderByRelative(RootObjectTypes.WorkorderItemScheduledUser, util.GetIDFromRequest(Request));
Guid mNewWorkorderItemLabor = w.CreateLaborFromScheduledUser(i.LT_WorkorderItem_Label_ID, id);
if (mNewWorkorderItemLabor == Guid.Empty)
throw new ApplicationException("Sched2Labor: newworkorderitemlabor is empty, failed to convert scheduser to labor");
w.Save();
Response.Redirect("labor.aspx?id="+mNewWorkorderItemLabor.ToString());
}
}
}