using System; using System.Data; using System.Configuration; 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 StateMachineWorkflowActivity; using Domain; public partial class _Default : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { ViewState["CAR_ID"] = Convert.ToInt32(Request.QueryString["CarID"]); ViewState["State"] = Convert.ToInt32(Request.QueryString["State"]); } protected void btnRun_Click(object sender, EventArgs e) { Car car=new Car(); car.CarID=Convert.ToInt32(ViewState["CAR_ID"]); car.Remark = "State Machine Compiler:Run Car"; car.State = (Utilities.CarState)Convert.ToInt32(ViewState["State"]); car.User=444; StateMachineWorkflowActivity.IWFFactory m_WFactory= new StateMachineWorkflowActivity.WFFactory(); StateMachineWorkflowActivity.ICarWF m_CarWF= m_WFactory.StartWorkFlowStateMachine(car); m_CarWF.SubmitRun(); Response.Redirect("CarDashboard.aspx", false); } protected void btnStop_Click(object sender, EventArgs e) { Car car = new Car(); car.CarID = Convert.ToInt32(ViewState["CAR_ID"]); car.Remark = "State Machine Compiler:Stop Car"; car.State = (Utilities.CarState)Convert.ToInt32(ViewState["State"]); car.User = 444; StateMachineWorkflowActivity.IWFFactory m_WFactory = new StateMachineWorkflowActivity.WFFactory(); StateMachineWorkflowActivity.ICarWF m_CarWF = m_WFactory.StartWorkFlowStateMachine(car); m_CarWF.SubmitStop(); Response.Redirect("CarDashboard.aspx", false); } }
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)