// create the Request for Proposal and start the workflow protected void CreateAndSubmitRfp(object sender, EventArgs e) { // collect info from the UI and create the RFP RequestForProposal rfp = new RequestForProposal() { Title = txtTitle.Text, Description = txtDescription.Text }; // add invited vendors for (int counter = 0; counter < chkVendorsList.Items.Count; counter++) { if (chkVendorsList.Items[counter].Selected) { int vendorId = int.Parse(chkVendorsList.Items[counter].Value); rfp.InvitedVendors.Add(VendorRepository.Retrieve(vendorId)); } } // get the instance of the host and create and run the new workflow PurchaseProcessHost host = GetHost(); host.CreateAndRun(rfp); // return to the main simulation page Response.Redirect("Default.aspx"); }
private void ShowProposals_Load(object sender, EventArgs e) { // create an instance of the host this.PurchaseProcessHost = new PurchaseProcessHost(); // refresh the lists of Requests for Proposals (active and finished) this.RefreshLists(); // load the participants combo in the toolbar this.LoadParticipantsCombo(); }