singleOperation() public method

public singleOperation ( string SQLcmd ) : bool
SQLcmd string
return bool
        private static void addDefault()
        {
            String checkName = "select * from loginInfo where userName='******'" ;

            DBOperation op = new DBOperation();
            DataTable checkDefault = op.getDataTable(checkName, "loginInfo");

            if (checkDefault.Rows.Count == 0)
            {
                String defpass = AddAccount.MD5("123456");
                String addDefault = "insert into loginInfo(userName, password, privilege) values('default', '" + defpass + "', 0)";
                op.singleOperation(addDefault);
                MessageBox.Show("已添加默认账号");
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            if(this.addname.Text == "")
            {
                MessageBox.Show("请输入用户名");
                return;
            }
            if(this.addpass.Text == "")
            {
                MessageBox.Show("请输入密码");
                return;
            }

            if (this.addrepass.Text == "")
            {
                MessageBox.Show("请输入密码");
                return;
            }

            if (this.privilege.Text == "")
            {
                MessageBox.Show("请选择权限");
                return;
            }

            if (this.addname.Text.Length > 16 || this.addname.Text.Length < 6)
            {
                MessageBox.Show("用户名应为6至16位");
                return;
            }

            if (this.addpass.Text.Length > 20 || this.addpass.Text.Length < 6)
            {
                MessageBox.Show("密码应为6至20位");
                return;
            }

            if(!this.addpass.Text.Equals(this.addrepass.Text))
            {
                MessageBox.Show("两次输入密码不匹配");
                return;
            }

            op = new DBOperation();
            String check = "select * from loginInfo where userName='******'";
            DataTable search = op.getDataTable(check, "loginInfo");
            if (search.Rows.Count != 0)
            {
                MessageBox.Show("该用户名已存在");
                return;
            }

            String md5 = MD5(this.addpass.Text);

            op = new DBOperation();
            String addAccount = "insert into loginInfo(userName, password, privilege) values('" + this.addname.Text
                + "', '" + md5 + "', " + this.addPri.Text + ")";
            MessageBox.Show(md5);
            if (op.singleOperation(addAccount))
            {
                this.addname.Text = "";
                this.addpass.Text = "";
                this.addPri.Text = "";

                MessageBox.Show("添加成功");
            }
        }