www.pudn.com > SampleSimpleWorkflow.zip > Workflow1.cs


using System; 
using System.ComponentModel; 
using System.ComponentModel.Design; 
using System.Collections; 
using System.Drawing; 
using System.Workflow.ComponentModel.Compiler; 
using System.Workflow.ComponentModel.Serialization; 
using System.Workflow.ComponentModel; 
using System.Workflow.ComponentModel.Design; 
using System.Workflow.Runtime; 
using System.Workflow.Activities; 
using System.Workflow.Activities.Rules; 
 
namespace simpleWorkflow 
{ 
	public sealed partial class Workflow1 : SequentialWorkflow 
	{ 
		public Workflow1() 
		{ 
			InitializeComponent(); 
		} 
 
		private void code1_ExecuteCode(object sender, EventArgs e) 
		{ 
			this.Parameters["validOrder"].Value = "This is a large order.  The amount was " + this.Parameters["orderAmount"].Value.ToString(); 
		} 
 
		private bool largeOrder(object sender, EventArgs e) 
		{ 
			if (System.Convert.ToInt32(this.Parameters["orderAmount"].Value) > 1000) 
				return true; 
			else 
				return false; 
		} 
 
		private void code2_ExecuteCode(object sender, EventArgs e) 
		{ 
			this.Parameters["validOrder"].Value = "This is a small order.  The amount was " + this.Parameters["orderAmount"].Value.ToString(); 
		} 
 
	} 
 
}