public static Project createProject(QCServer qcServer, QCDataserver dbServer, string domainName, string projectName) { Project p = qcServer.createProject(dbServer, domainName, projectName); projects.Add(p); return(p); }
//todo //get all db servers internal #region createProject //full parameter internal Project createProject(QCDataserver dataServer, string domainName, string projectName) { if (dataServer == null) { dataServer = getDBServer(QCDataserver.ANY_DB); } if (domainName == "") { domainName = defaultDomain; } if (projectName == "") { projectName = getNewProjectName(); } int spaceSize = 0; int tempSize = 0; int creationOption = 1; try { saConnection.CreateProject(domainName, projectName, dataServer.DbType, dataServer.DbServerName, dataServer.AdminUser, dataServer.AdminPassword, dataServer.TableSpace, dataServer.TempSpace, spaceSize, tempSize, creationOption); return(new Project(this.Url, projectName, domainName, dataServer.AdminUser, dataServer.AdminPassword)); } catch (Exception e) { Console.Write(e.Message); return(null); } }
//create project according specific db type internal Project createProject(int dbType, string domainName, string projectName) { QCDataserver dataServer = getDBServer(dbType); if (dataServer == null) { return(null); } return(createProject(dataServer, domainName, projectName)); }
internal static void load() { //get qc servers string serverName = defaultServerName; string url = "http://192.168.34.15:8080/qcbin"; string username = "******"; string password = ""; QCServer qcServer = new QCServer(url, username, password); qcServers.Add(serverName, qcServer); //get db servers string dbServer = "192.168.34.15\\QA"; string admin = "sa"; string pwd = "!qaz2wsx"; QCDataserver qcDataserver1 = new QCDataserver(dbServer, admin, pwd); qcServer.addDBServer(qcDataserver1); qcDataServers.Add(dbServer, qcDataserver1); //int type = 3; //dbServer = "apps002"; //admin = "system"; //pwd = "!qaz2wsx"; //string space = "ALMTABLESPACE1"; //string tempSpace = "TEMP"; //QCDataserver qcDataserver2 = new QCDataserver(type, dbServer, admin, pwd, space, tempSpace); //qcServer.addDBServer(qcDataserver2); //qcDataServers.Add(dbServer, qcDataserver2); //SA login foreach (QCServer server in qcServers.Values) { server.connect(); } }
public static Project createProject(QCServer qcServer, QCDataserver dbServer, string domainName, string projectName) { Project p = qcServer.createProject(dbServer, domainName, projectName); projects.Add(p); return p; }
internal static void load() { //get qc servers string serverName = defaultServerName; string url = "http://192.168.34.15:8080/qcbin"; string username = "******"; string password = ""; QCServer qcServer = new QCServer(url, username, password); qcServers.Add(serverName, qcServer); //get db servers string dbServer = "192.168.34.15\\QA"; string admin = "sa"; string pwd = "!qaz2wsx"; QCDataserver qcDataserver1 = new QCDataserver(dbServer, admin, pwd); qcServer.addDBServer(qcDataserver1); qcDataServers.Add(dbServer,qcDataserver1); //int type = 3; //dbServer = "apps002"; //admin = "system"; //pwd = "!qaz2wsx"; //string space = "ALMTABLESPACE1"; //string tempSpace = "TEMP"; //QCDataserver qcDataserver2 = new QCDataserver(type, dbServer, admin, pwd, space, tempSpace); //qcServer.addDBServer(qcDataserver2); //qcDataServers.Add(dbServer, qcDataserver2); //SA login foreach (QCServer server in qcServers.Values) { server.connect(); } }
internal void addDBServer(QCDataserver dataServer) { dataServers.Add(dataServer.DbServerName, dataServer); }
public static Project createProject(QCServer qcServer, int dbType) { QCDataserver dbServer = qcServer.getDBServer(dbType); return(createProject(qcServer, dbServer, "", "")); }
public static Project createProject(QCServer qcServer, int dbType, string domainName, string projectName) { QCDataserver dbServer = qcServer.getDBServer(dbType); return(createProject(qcServer, dbServer, domainName, projectName)); }