private void btnCrtDb_Click(object sender, EventArgs e) { Create_Database Create_Database = new Create_Database(); this.Hide(); Create_Database.Show(); }
private void btnCreate_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(txtDbName.Text.Replace(" ", ""))) { DataLayer.Configuration.CreateDatabase(txtDbName.Text); Create_Database crt = new Create_Database(); this.Dispose(); crt.Show(); } else { MessageBox.Show("Fill in the database name."); } }
private void Index_Load(object sender, EventArgs e) { //var connectionString = "mongodb://localhost"; //var client = new MongoClient(connectionString); //var database = client.GetDatabase("mydb"); //var collection = database.GetCollection<Entity>("testData"); //var entity = collection.Find(x => x.Name != ""); Create_Database crt = new Create_Database(); crt.Close(); Drop_Database drp = new Drop_Database(); drp.Close(); }