public IActionResult EditFilesDB(int i)
        {
            var req = this.HttpContext.Request.Form;
            EbFilesDbConnection FilesDB = new EbFilesDbConnection();

            FilesDB.FilesDB_url = req["url"].ToString();
            var r = this.ServiceClient.Post <bool>(new ChangeFilesDBConnectionRequest {
                FilesDBConnection = FilesDB, IsNew = false
            });

            return(Redirect("/ConnectionManager"));
        }
Exemplo n.º 2
0
        public IActionResult FilesDb(int i)
        {
            GetConnectionsResponse solutionConnections = this.ServiceClient.Post <GetConnectionsResponse>(new GetConnectionsRequest {
                ConnectionType = (int)EbConnectionTypes.EbFILES
            });
            var req = this.HttpContext.Request.Form;
            EbFilesDbConnection dbcon = new EbFilesDbConnection();

            dbcon.FilesDB_url = req["url"].ToString();
            if (solutionConnections.EBSolutionConnections.FilesDbConnection != null)
            {
                this.ServiceClient.Post <bool>(new ChangeFilesDBConnectionRequest {
                    FilesDBConnection = dbcon, IsNew = false
                });
            }
            else
            {
                this.ServiceClient.Post <bool>(new ChangeFilesDBConnectionRequest {
                    FilesDBConnection = dbcon, IsNew = true
                });
            }
            return(Redirect("/ConnectionManager"));
        }
Exemplo n.º 3
0
 public MongoDBDatabase(string tenantId, EbFilesDbConnection dbconf)
 {
     this.TenantId = tenantId;
     mongoClient   = new MongoClient(dbconf.FilesDB_url);
     mongoDatabase = mongoClient.GetDatabase(tenantId);
 }