Beispiel #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     BLL.UserBLL bll = new BLL.UserBLL();
     if (bll.GetData().Rows.Count == 0)
     {
         Models.Users user = new Models.Users()
         {
             UserId       = Utils.getGUID(),
             UserName     = this.textBox1.Text,
             UserPassword = this.textBox2.Text
         };
         BLL.FunctionResult result = bll.Create(user);
         if (result.ExcuteState)
         {
             MessageBox.Show("添加用户成功");
             bind();
         }
     }
 }