/// <summary> /// This method is to handle any orphaned iSecStar client pop-up from the previous failures /// This will close the orphaned prompts from previous iteration runs if any. /// </summary> private void CloseOrphanedClientPopup() { TopCatUIAutomation.Initialize(); _printLogin = new PrintLogin(UIAFramework.ManagedUIA); if (_printLogin.PrintLogin32770Window.IsAvailable()) { _printLogin.CloseButton2Button.ClickWithMouse(MouseButton.Left, WindowsTimeout); Thread.Sleep(humanTimeSpan); } }
/// <summary> /// This method is created to handle any Error prompts thrown by the ISecStar Client . /// It is observed that even on entering the correct credentials the iSecStar clients throws error messages which could be timing or TopCat issues /// </summary> /// <returns></returns> private bool CheckForErrorPrompt() { _printLogin = new PrintLogin(UIAFramework.ManagedUIA); if (_printLogin.Message32770Window.IsAvailable()) { _printLogin.OKButton2Button.ClickWithMouse(MouseButton.Left, WindowsTimeout); Thread.Sleep(humanTimeSpan); _printLogin.Edit1000Edit.PerformHumanAction(x => x.EnterText("", WindowsTimeout)); Thread.Sleep(humanTimeSpan); _printLogin.Edit1001Edit.PerformHumanAction(x => x.EnterText("", WindowsTimeout)); Thread.Sleep(humanTimeSpan); return(true); } return(false); }
private DataTable GetTable() { string text = " and 1=1 "; if (!string.IsNullOrEmpty(this.mindate.Text.Trim())) { text = text + " and dtm_dlsj >= '" + this.mindate.Text.Trim() + "' "; } if (!string.IsNullOrEmpty(this.maxdate.Text.Trim())) { text = text + " and dtm_dlsj <= '" + Convert.ToDateTime(this.maxdate.Text.Trim()).AddDays(1.0).ToString("yyyy-MM-dd") + "' "; } if (!string.IsNullOrEmpty(this.txtPeople.Value)) { text = text + " and v_xm like '%" + this.txtPeople.Value + "%'"; } DataTable dataTable = PrintLogin.PintLoginDT(text); this.dgLogList.DataSource = dataTable; this.dgLogList.DataBind(); return(dataTable); }
/// <summary> /// Performs the print dialog task /// </summary> /// <param name="executionData"></param> private void PerformPrintTask(PluginExecutionData executionData) { string username = executionData.Credential.UserName; string password = executionData.Credential.Password; TopCatUIAutomation.Initialize(); _printLogin = new PrintLogin(UIAFramework.ManagedUIA); if (_printLogin.PrintLogin32770Window.IsAvailable()) { _printLogin.Edit1000Edit.ClickWithMouse(MouseButton.Left, WindowsTimeout); Thread.Sleep(humanTimeSpan); SendKeys.SendWait(username); _printLogin.Edit1001Edit.ClickWithMouse(MouseButton.Left, WindowsTimeout); Thread.Sleep(humanTimeSpan); SendKeys.SendWait(password); _printLogin.SubmitButton1Button.WaitForAvailable(WindowsTimeout); _printLogin.SubmitButton1Button.PerformHumanAction(x => x.ClickWithMouse(MouseButton.Left, WindowsTimeout)); } else { UpdateStatus("Could not launch ISecStar Client Popup"); } }