internal List <StartLink> GetStartLinksOfClass(Class Class) { List <StartLink> listOfLinks = new List <StartLink>(); if (Class == null || Class.IdClass == null) { return(listOfLinks); } DbDataReader dRead; DbCommand cmd; using (DbConnection conn = Connect()) { cmd = conn.CreateCommand(); cmd.CommandText = "SELECT *" + " FROM Classes_StartLinks" + " WHERE idClass=" + Class.IdClass + "; "; dRead = cmd.ExecuteReader(); while (dRead.Read()) { StartLink l = new StartLink(); l.Link = Safe.String(dRead["startLink"]); l.Desc = Safe.String(dRead["Desc"]); l.IdClass = Safe.Int(dRead["IdClass"]); l.IdStartLink = Safe.Int(dRead["IdStartLink"]); listOfLinks.Add(l); } dRead.Dispose(); cmd.Dispose(); } return(listOfLinks); }
private void DgwLinks_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex > -1) { DgwLinks.Rows[e.RowIndex].Selected = true; currentLink = ((List <StartLink>)DgwLinks.DataSource)[e.RowIndex]; } }
public PrimerLink(ILink <TPayload> firstValue) { var predecessor = firstValue as IPredecessor <TPayload>; var isPredecessor = predecessor != null; var successor = firstValue as ISuccessor <TPayload>; var isSuccessor = successor != null; if (isPredecessor && isSuccessor) { Previous = predecessor; Next = successor; } else if (isSuccessor) { var endLink = new EndLink <TPayload>(new LazySuccessorProxy <TPayload>(() => Next)); var primer = LinkPredecessorDecorator <TPayload> .Decorate(successor, endLink); Previous = primer; Next = primer; } else if (isPredecessor) { var startLink = new StartLink <TPayload>(new LazyPredecessorProxy <TPayload>(() => Previous)); var primer = LinkSuccessorDecorator <TPayload> .Decorate(predecessor, startLink); Previous = primer; Next = primer; } else { var startLink = new StartLink <TPayload>(new LazyPredecessorProxy <TPayload>(() => Previous)); var endLink = new EndLink <TPayload>(new LazySuccessorProxy <TPayload>(() => Next)); Previous = LinkPredecessorDecorator <TPayload> .Decorate(firstValue, endLink); Next = LinkSuccessorDecorator <TPayload> .Decorate(firstValue, startLink); } }
/// <summary> /// Click the Start link on the right hand side of the screen in order to begin the application process /// </summary> public void ClickStart() { Console.Out.WriteLineAsync("Page: Attempting to Click the Start button to begin the application process."); StartLink.WaitAndClick(_driver); }