/// <summary> /// Sets the connection info for the parsing services /// </summary> /// <returns>true if success false otherwize</returns> public string saveNewServiceConnectionInfo(string pi_username, string pi_password, string pi_sauser, string pi_sapass) { string result = ""; TPDBConnection conn = new TPDBConnection(); IDbConnection dbconn = conn.Open(pi_sauser, pi_sapass); if (dbconn != null) { if (dbconn.State == ConnectionState.Open) { conn.close(); dbconn = conn.Open(pi_username, pi_password); if (dbconn != null) { if (dbconn.State == ConnectionState.Open) { conn.close(); this.loadProps(); this.m_Inistruct.ModifyValue("Security", "SERVICE_UserName", this.encryptString(pi_username)); this.m_Inistruct.ModifyValue("Security", "SERVICE_Password", this.encryptString(pi_password)); bool res = this.saveProps(); if (!res) { result = "<Result>\n\t<SUCCESS>false</SUCCESS>\n\t<MESSAGE>Error Writing New Name and Password to File</MESSAGE>\n</Result>"; } else { result = "<Result>\n\t<SUCCESS>true</SUCCESS>\n\t<MESSAGE>New Name and Password Correctly Stored</MESSAGE>\n</Result>"; } } else { result = "<Result>\n\t<SUCCESS>false</SUCCESS>\n\t<MESSAGE>New User Name or Password is Invalid</MESSAGE>\n</Result>"; } } else { result = "<Result>\n\t<SUCCESS>false</SUCCESS>\n\t<MESSAGE>New User Name or Password is Invalid</MESSAGE>\n</Result>"; } } else { result = "<Result>\n\t<SUCCESS>false</SUCCESS>\n\t<MESSAGE>Admin User Name or Password is Invalid</MESSAGE>\n</Result>"; } } else { result = "<Result>\n\t<SUCCESS>false</SUCCESS>\n\t<MESSAGE>Admin User Name or Password is Invalid</MESSAGE>\n</Result>"; } return(result); }
public void storeCasinoInfo(string pi_propertyname, string pi_contractnumber, int pi_propertyid) { TPDBConnection tpconn = new TPDBConnection(); tpconn.UserID = this.m_TPUserID; tpconn.Password = this.m_TPPassword; tpconn.setCasinoInfo(pi_propertyname, pi_contractnumber, pi_propertyid); tpconn.releaseResources(); tpconn.close(); }