public string setBSTUsers(List <BSTUser> users) { foreach (BSTUser u in users) { BSTUser ustore = new BSTUser(u.ID); ustore.FromAnotherObject(u); if (ustore.IsModified()) { ustore.Store(); } } return("OK"); }
public void StartTest(string guid, string commaseparatedbatches, string commaseparatedcommands, string priority) { BSTUser bu = new BSTUser("", "bst"); string[] batches = commaseparatedbatches.Split(new string[] { "," }, StringSplitOptions.RemoveEmptyEntries); foreach (string batch in batches) { TestRequest.RunBatch4Request(bu.LOGIN, batch, guid, priority); } if (!string.IsNullOrEmpty(commaseparatedcommands)) { TestRequest tr = new TestRequest("", guid); string txtcommands = string.Join("\r\n", commaseparatedcommands.Split(',')); string[] Commands; string[] arrGroup; TestRequest.GetCommandsGroups(txtcommands, out Commands, out arrGroup); Schedule.AddCommands(Commands, arrGroup, tr.ID.ToString(), bu.ID.ToString(), priority); } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString[CurrentContext.retiredURL] != null) { message.Text = "This user has retired!"; } CurrentContext.User = null; return; } CurrentContext.User = BSTUser.FindUser(usr.Text, pwd.Text); if (CurrentContext.Valid) { if (keeplogged.Checked) { HttpCookie c = new HttpCookie( CurrentContext.ucook, CurrentContext.User.ID.ToString()) { Expires = DateTime.Today.AddYears(1) }; Response.Cookies.Add(c); } if (Request.QueryString[SecurityPage.returl] != null) { Response.Redirect(Request.QueryString[SecurityPage.returl].ToString(), false); } else { Response.Redirect("~/", false); } Context.ApplicationInstance.CompleteRequest(); return; } }
public List <BSTUser> getBSTUsers() { return(BSTUser.Enum()); }