Click here to Skip to main content
15,886,536 members
Articles / Web Development / IIS

Rapid Web Application Development

Rate me:
Please Sign up or sign in to vote.
4.00/5 (5 votes)
27 Sep 200510 min read 203.9K   4.2K   86  
An article about the Multiformity Open Source project.
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using rasp.SQL;
using rasp.SQL.SQLStatement;
using rasp.SQL.DBInfo;
using rasp.HTML.Controls;
using rasp.Workflow;

//Process: Here is where I instantiate a process viewer, The problem here is that I don't want to be using the postback clause
//although it makes the process seem to work (problem being is that the first step in the process must be repeated).
//As you can see, I have put in an "AddProcess" method to the Conductor class, but when that line is not commented out, 
//I get the duplicate control error (in BasePage.cs), and none of the events for my process step fire.

namespace rasp.HTML.PageControls
{
	/// <summary>
	/// Summary description for ProcessConductor.
	/// </summary>
	public class ProcessViewer : PlaceHolder {
		private BasePage _Container;
		private string _ProcessName, _HubName, _ID;
		private UserInfo _UserInfo;
        private Process _Process;
        public Process TheProcess {
            get {
                return _Process;
            }
        }
		public int UserID { get { return _UserInfo.ID; } }
		public ProcessViewer(BasePage container, UserInfo userinfo)	{

			_UserInfo = userinfo;
			_Container = container;
			_ProcessName = _Container.Request.QueryString[Constants.Parameters.ProcessName];
			_HubName = _Container.Request.QueryString[Constants.Parameters.HubName];
			_ID = _Container.Request.QueryString[Constants.Parameters.HubID];

			int HubID = -1;
			try {
				HubID = int.Parse(_ID);
			} catch {}

			//_Process = Workflow.Conductor.GetProcess(_ProcessName, _HubName, int.Parse(_ID), _UserInfo, _Container);

			
			
      if (!_Container.IsPostBack) {
          _Process = new Process(_ProcessName, _HubName, int.Parse(_ID), _UserInfo, _Container);
					//Constants.Conductor.AddProcess(_Process, _ProcessName, _HubName, int.Parse(_ID), _UserInfo);
      }
      else {
				_Process = Constants.Conductor.GetProcess(_ProcessName, _HubName, int.Parse(_ID), _UserInfo, _Container);
      }
			
			
      _Process.ExecuteCurrentStep();
      Controls.Add(_Process.CurrentContent);
		}
	}
}

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.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions