3
using System.Configuration;
4
using System.Collections;
6
using System.Web.Security;
8
using System.Web.UI.WebControls;
9
using System.Web.UI.WebControls.WebParts;
10
using System.Web.UI.HtmlControls;
11
using System.Security.Principal;
15
public partial class BrtypesEqStreams1 : System.Web.UI.Page
17
private static readonly string CMDID = "troja_brtypes_eq_streams";
18
private static TrojaWS proxy;
19
private static string command = @"C:\Program Files\Rational\Common\ratlperl.exe";
20
private static string arguments = @"\\appdkhi008\ClearCase\scripts\brtypes_eq_streams.pl \PDS_PVOB";
21
private static EnvironmentVariable[] environment = null;
22
private static bool merge = false;
23
private static int to_hour = 0;
24
private static int to_min = 5;
25
private static int to_sec = 0;
29
private string[] userall;
31
protected void Page_Load(object sender, EventArgs e)
33
HeaderPlaceHolder.Controls.Add(Page.LoadControl("Header.ascx"));
38
proxy = new TrojaWS();
41
if (Session[CMDID] == null)
45
id = proxy.CreateCommand(userall, command, arguments, environment, merge, to_hour, to_min, to_sec);
50
StdErrLabel.Text = ex.Message;
55
id = (int)Session[CMDID];
59
protected void TimerTick(object Sender, EventArgs e)
61
Snapshot snapshot = proxy.TakeSnapshot(user, id);
63
StdOutLabel.Text = snapshot.StandardOutput.Replace("\n", "<br />");
64
StdErrLabel.Text = snapshot.StandardError;
66
if (snapshot.HasExited)
68
ExitValue.Text = "Exitcode: " + snapshot.ExitCode;
69
Timer.Enabled = false;
73
protected void ButtonClick(object Sender, EventArgs e)
75
Button.Enabled = false;
77
proxy.StartAsync(user, id);
81
private void InitUser()
83
user = WindowsIdentity.GetCurrent().Name.ToLower();
85
IdentityReferenceCollection groups = WindowsIdentity.GetCurrent().Groups;
86
userall = new string[1 + groups.Count];
91
foreach (IdentityReference reference in groups)
93
userall[i] = ((NTAccount)reference.Translate(typeof(NTAccount))).Value.ToLower();