private void btnSetup_Click(object sender, EventArgs e) { frmConnectionSetup frmConnectionSetup = new frmConnectionSetup(); frmConnectionSetup.ShowDialog(); if (this.txtIPAddressPortNo.Text != AppDomain.CurrentDomain.GetData("URLClientPath").ToString()) { this.txtIPAddressPortNo.Text = AppDomain.CurrentDomain.GetData("URLClientPath").ToString(); clsISClientUtilities = null; clsISClientUtilities = new clsISClientUtilities(null, "busTimeAttendanceLogon"); if (AppDomain.CurrentDomain.GetData("URLClientPath").ToString() != "") { int intReturnCode = clsISClientUtilities.WebService_Ping_Test(); if (intReturnCode == 0) { this.txtUserId.Enabled = true; this.txtPassword.Enabled = true; this.btnOK.Enabled = true; } else { this.txtUserId.Enabled = false; this.txtPassword.Enabled = false; this.btnOK.Enabled = false; } } } }
private void btnTest_Click(object sender, EventArgs e) { try { clsISClientUtilities = null; clsISClientUtilities = new clsISClientUtilities(this, "busTimeAttendanceLogon"); int intReturnCode = clsISClientUtilities.WebService_Ping_Test(); if (intReturnCode == 0) { System.Windows.Forms.MessageBox.Show("Communication Successful.", "Communication", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { //Form with Unsuccessful would show } } catch (Exception eException) { } }
public void frmLogonScreen_Load(object sender, System.EventArgs e) { try { this.Show(); this.Refresh(); Application.DoEvents(); this.Cursor = Cursors.AppStarting; clsCrc32 = new clsCrc32(); clsISClientUtilities = new clsISClientUtilities(this, "busTimeAttendanceLogon"); this.lblHeader.MouseDown += new System.Windows.Forms.MouseEventHandler(clsISClientUtilities.lblHeader_MouseDown); this.lblHeader.MouseMove += new System.Windows.Forms.MouseEventHandler(clsISClientUtilities.lblHeader_MouseMove); this.lblHeader.MouseUp += new System.Windows.Forms.MouseEventHandler(clsISClientUtilities.lblHeader_MouseUp); this.Paint += new System.Windows.Forms.PaintEventHandler(clsISClientUtilities.Form_Paint); //Cause Paint this.Refresh(); clsISUtilities = new clsISUtilities(this, "busPayrollLogon"); clsISUtilities.Set_WebService_Timeout_Value(30000); if (AppDomain.CurrentDomain.GetData("URLClientPath").ToString() != "") { this.txtIPAddressPortNo.Text = AppDomain.CurrentDomain.GetData("URLClientPath").ToString(); this.Refresh(); int intReturnCode = clsISClientUtilities.WebService_Ping_Test(); if (intReturnCode == 0) { this.txtUserId.Enabled = true; this.txtPassword.Enabled = true; this.btnOK.Enabled = true; } } else { this.txtIPAddressPortNo.Text = "Late Binding"; this.txtUserId.Enabled = true; this.txtPassword.Enabled = true; this.btnOK.Enabled = true; } pvtDataSet = new DataSet(); #if (DEBUG) { this.txtUserId.Text = "Interact"; this.txtPassword.Text = "tcaretni"; //this.txtUserId.Text = "helenalr"; //this.txtPassword.Text = "monster"; //this.txtUserId.Text = "TyroneS"; //this.txtPassword.Text = "271083"; //this.txtUserId.Text = "ChristineG"; //this.txtPassword.Text = "CHRIS1"; //this.txtUserId.Text = "MIGS"; //this.txtPassword.Text = "MIGS"; //this.txtUserId.Text = "TREVOR"; //this.txtPassword.Text = "3636"; //this.txtUserId.Text = "JAMESM"; //this.txtPassword.Text = "JAMES456"; } #endif this.txtUserId.Focus(); #if (DEBUG) SendKeys.Send("{ENTER}"); #endif this.Cursor = Cursors.Default; } catch (Exception eException) { clsISClientUtilities.ErrorHandler(eException); this.txtUserId.Enabled = true; this.txtPassword.Enabled = true; this.Cursor = Cursors.Default; this.btnOK.Enabled = true; } }