示例#1
0
文件: Form1.cs 项目: nfeed/nfeed-dev
        private void button1_Click(object sender, System.EventArgs e)
        {
            list_user.Items.Clear();
            user usr = new user(MCMS.Properties.Settings.Default.host, MCMS.Properties.Settings.Default.username, MCMS.Properties.Settings.Default.password, MCMS.Properties.Settings.Default.database);

            foreach (string result in usr.get_all_user())
            {
                list_user.Items.Add(result);
            }

            //MessageBox.Show(usr.get_user_by_id("teyhouse").ToString());
            //MessageBox.Show(usr.getlastid().ToString());

            /*
            if (usr.adduser("mama", "papa", "*****@*****.**", 0))
            {
                MessageBox.Show("Nutzer wurde angelegt!");
            }*/

            /*
            if (usr.delete_user_by_id(24))
            {
                MessageBox.Show("Nutzer gelöscht!");
            }
             * */
        }
示例#2
0
文件: Form1.cs 项目: nfeed/nfeed-dev
 private void button2_Click(object sender, System.EventArgs e)
 {
     user usr = new user(MCMS.Properties.Settings.Default.host, MCMS.Properties.Settings.Default.username, MCMS.Properties.Settings.Default.password, MCMS.Properties.Settings.Default.database);
     if (usr.adduser(textBox1.Text, textBox2.Text, textBox3.Text, int.Parse(textBox4.Text)))
     {
         MessageBox.Show("Nutzer wurde angelegt!");
     }
     button1_Click(sender, e);
 }
示例#3
0
文件: Form1.cs 项目: nfeed/nfeed-dev
 private void button3_Click(object sender, System.EventArgs e)
 {
     if (list_user.SelectedItems.Count > 0)
     {
         user usr = new user(MCMS.Properties.Settings.Default.host, MCMS.Properties.Settings.Default.username, MCMS.Properties.Settings.Default.password, MCMS.Properties.Settings.Default.database);
         if (usr.delete_user_by_id(usr.get_user_by_id(list_user.SelectedItem.ToString())))
         {
             MessageBox.Show("Nutzer gelöscht!");
         }
     }
     else
     {
         MessageBox.Show("Bitte einen Nutzer auswählen!");
     }
     button1_Click(sender, e);
 }