示例#1
0
        public bool Modify()
        {//
            bool b2 = Foundation.RunSql("update otherinfo set itemvalue='" + (this.cbSell2Print.Checked ? "1" : "0") + "' where itemname='Sell2Print'");

            OleDbConnection conn   = Foundation.CreateInstance();
            string          strSql = "update otherinfo set itemvalue=@itemvalue where itemname='Notethings'";
            OleDbCommand    cmd    = new OleDbCommand(strSql, conn);

            cmd.Parameters.AddWithValue("@itemvalue", this.txtNotethings.Text.Trim());

            bool b3 = Foundation.RunSql(@"update otherinfo set itemvalue='" + this.txtBackupDir.Text + "' where itemname='backup'");

            return(b3 && b2 && cmd.ExecuteNonQuery() > 0);
        }