예제 #1
0
        private void CloseButton_Click(object sender, EventArgs e)
        {
            Form c = new LAB1();

            c.Show();
            this.Hide();
        }
예제 #2
0
        private void bunifuImageButton1_Click(object sender, EventArgs e)
        {
            Form F = new LAB1();

            F.Show();
            this.Hide();
        }
예제 #3
0
        private void Results_Load(object sender, EventArgs e)
        {
            LAB1                 lab1       = new LAB1();
            MongoClient          client     = new MongoClient("mongodb://localhost");
            var                  db         = client.GetDatabase("SysAnalys1");
            var                  collection = db.GetCollection <Choice>("users");
            BindingList <Choice> doclist    = new BindingList <Choice>();

            foreach (var deger in collection.Find(_ => true).ToList())
            {
                doclist.Add(deger);
                Application.DoEvents();
            }
            dataGridView1.DataSource = doclist;
        }
예제 #4
0
        private async void button2_Click(object sender, EventArgs e)
        {
            MongoClient client     = new MongoClient("mongodb://localhost");
            var         db         = client.GetDatabase("SysAnalys1");
            var         collection = db.GetCollection <Problem>("problems");

            for (int j = 0; j < n; j++)
            {
                Problem docum1 = new Problem
                {
                    Problems = box1[j].Text,
                };
                await collection.InsertOneAsync(docum1);
            }
            this.Hide();
            Form a = new LAB1();

            a.Show();
        }