
using System;
using System.Text;
using System.Web;
using System.Web.UI;
using System.Collections;
using System.Collections.Generic;

using Legalsoft.Workflow.Application;

public partial class _Include_Start_Process : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/html;charset=UTF-8";

        CommandInfo cmd = new CommandInfo();
        if (Request["FlowName"] != null) cmd.FlowName = Baby.U(Request["FlowName"].ToString());
        if (Request["FlowId"] != null) if (Request["FlowId"].ToString().Length > 0) cmd.FlowId = Int32.Parse(Request["FlowId"].ToString());
        if (Request["NodeName"] != null) cmd.NodeName = Baby.U(Request["NodeName"].ToString());
        if (Request["NodeId"] != null) if (Request["NodeId"].ToString().Length > 0) cmd.NodeId = Int32.Parse(Request["NodeId"].ToString());
        if (Request["Role"] != null) cmd.Role = Baby.U(Request["Role"].ToString());
        if (Request["MemberId"] != null) cmd.MemberId = Int32.Parse(Request["MemberId"].ToString());
        if (Request["MemberName"] != null) cmd.MemberName = Baby.U(Request["MemberName"].ToString());
        if (Request["Operation"] != null) cmd.Operation = Baby.U(Request["Operation"].ToString());

        ParaInfo pv = new ParaInfo();
        pv.Name = Baby.U(Request["ParaName"].ToString());
        pv.Value = Request["ParaValue"].ToString();
        cmd.Paras = new List<ParaInfo>();
        cmd.Paras.Add(pv);

        cmd.TimeStamp = DateTime.Now + "";
        cmd.LocalUrl = Baby.LocalUrl;
        cmd.RemoteUrl = Baby.RemoteUrl;

        Commands.Send(cmd);
        Commands.Save();

        Response.Write("SEND OK");
    }
}
