Beispiel #1
0
        protected void ButtonPlay_Click(object sender, EventArgs e)
        {
            if (Page.IsValid)
            {
                if (dt.Rows.Count > 0)
                {
                    Flows playflow = SaveFlow();
                    if (playflow != null)
                    {
                        FlowInstances currentFlow = new FlowInstances();
                        dbHelper helper = new dbHelper();
                        DataRow firstRow = dt.Rows[0];
                        Actions startAction = helper.GetActionById(firstRow["Id"].ToString());

                        currentFlow.Actions = startAction;
                        currentFlow.CurrentPosition = 1;
                        currentFlow.Users = playflow.Users;
                        currentFlow.Flows = playflow;
                        helper.AddToModel(currentFlow);

                        Session["currentInstance"] = currentFlow;
                        Server.Transfer(currentFlow.Actions.ActionPage);
                    }
                }
            }
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the FlowInstances EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFlowInstances(FlowInstances flowInstances)
 {
     base.AddObject("FlowInstances", flowInstances);
 }
 /// <summary>
 /// Create a new FlowInstances object.
 /// </summary>
 /// <param name="flowInstanceId">Initial value of the FlowInstanceId property.</param>
 /// <param name="currentPosition">Initial value of the CurrentPosition property.</param>
 public static FlowInstances CreateFlowInstances(global::System.Int32 flowInstanceId, global::System.Int32 currentPosition)
 {
     FlowInstances flowInstances = new FlowInstances();
     flowInstances.FlowInstanceId = flowInstanceId;
     flowInstances.CurrentPosition = currentPosition;
     return flowInstances;
 }