
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_Forward : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        Response.ContentType = "text/html;charset=UTF-8";

        int id = 0;
        if (Request["id"] != null) id = Int32.Parse(Request["id"].ToString());
        CommandInfo cmd = Commands.Find(id);
        if (cmd.FlowId == 0) { Response.Write("error flow id"); return; }
        string Paras = "";
        if (cmd.Paras != null) if (cmd.Paras.Count > 0) Paras = cmd.Paras[0].Value;

        StringBuilder sb = new StringBuilder();
        sb.AppendLine("<table width=\"0%\">");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"width:200px;text-align:right;\">指令Command：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"Id\" name=\"Id\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.Id + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">流程Flow：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"FlowName\" name=\"FlowName\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.FlowName + "\"> ");
        sb.AppendLine("		ID=<input type=\"text\" id=\"FlowId\" name=\"FlowId\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.FlowId + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">节点：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"NodeName\" name=\"NodeName\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.NodeName + "\">");
        sb.AppendLine("		ID=<input type=\"text\" id=\"NodeId\" name=\"NodeId\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.NodeId + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">角色Role：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"Role\" name=\"Role\" size=\"24\" value=\"" + cmd.Role + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">前一用户Member：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"MemberName1\" name=\"MemberName1\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.MemberName + "\">");
        sb.AppendLine("		ID=<input type=\"text\" id=\"MemberId1\" name=\"MemberId1\" size=\"24\" readonly style=\"border:none;\" value=\"" + cmd.MemberId + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">用户Member：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"MemberName\" name=\"MemberName\" size=\"24\" value=\"\">");
        sb.AppendLine("		ID=<input type=\"text\" id=\"MemberId\" name=\"MemberId\" size=\"24\" value=\"\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">参数Paras：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"text\" id=\"ParaName\" name=\"ParaName\" size=\"24\" readonly style=\"border:none;\" value=\"金额\">");
        sb.AppendLine("		=<input type=\"text\" id=\"ParaValue\" name=\"ParaValue\" size=\"24\" readonly style=\"border:none;\" value=\"" + Paras + "\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\">决定Decision：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"radio\" id=\"Decision\" name=\"Decision\" value=\"yes\" onclick=\"document.getElementById('dx').style.display='none';\">同意Agree ");
        sb.AppendLine("		<input type=\"radio\" id=\"Decision\" name=\"Decision\" value=\"no\" onclick=\"document.getElementById('dx').style.display='';\">不同意Disagree");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr id=\"dx\" style=\"display:none;\">");
        sb.AppendLine("	<td style=\"text-align:right;\">不同意Disagree：</td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"radio\" id=\"Operation\" name=\"Operation\" value=\"backward\">退回Back ");
        sb.AppendLine("		<input type=\"radio\" id=\"Operation\" name=\"Operation\" value=\"cancel\">取消Cancel");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("<tr>");
        sb.AppendLine("	<td style=\"text-align:right;\"></td>");
        sb.AppendLine("	<td>");
        sb.AppendLine("		<input type=\"button\" id=\"sub1\" name=\"sub1\" value=\"提交\" style=\"width:90px;height:35px;cursor:pointer;\" onclick=\"forward_action()\">");
        sb.AppendLine("	</td>");
        sb.AppendLine("</tr>");
        sb.AppendLine("</table>");

        Response.Write(sb.ToString());
    }
}
