示例#1
0
        public static bool rd_insert_insql(Reader r)
        {
            string sql = "Insert into dbo.reader (rdID,rdPwd,rdType,rdName,rdSex,rdDept,rdStatus,rdPhoto,rdDateReg,rdEmail,rdPhone,rdQQ,rdBorrowQty,rdAdminRoles) values ('"
                         + r.rdID + "','"
                         + r.rdPwd + "','"
                         + r.rdType + "','"
                         + r.rdName + "','"
                         + r.rdSex + "','"
                         + r.rdDept + "','"
                         + r.rdStatus + "','"
                         + r.rdPhoto + "','"
                         + ReaderDAL.match(r.rdDateReg) + "','"
                         + r.rdEmail + "','"
                         + r.rdPhone + "','"
                         + r.rdQQ + "','"
                         + r.rdBorrowQty + "','"
                         + r.rdAdminRoles
                         + "')";

            return(Sq_h.run_rn(sql) == 1 ? true : false);
        }
示例#2
0
        public static bool rd_update_insql(Reader r)
        {
            string sql = string.Format(
                "Update dbo.reader set rdPwd='{0}',rdType='{1}',rdName='{2}',rdSex='{3}',rdDept='{4}',rdStatus='{5}',rdPhoto='{6}',rdDateReg='{7}',rdEmail='{8}',rdPhone='{9}',rdQQ='{10}',rdBorrowQty='{11}',rdAdminRoles='{12}' where rdID='{13}'",
                r.rdPwd, r.rdType, r.rdName, r.rdSex, r.rdDept, r.rdStatus, r.rdPhoto, ReaderDAL.match(r.rdDateReg), r.rdEmail, r.rdPhone, r.rdQQ, r.rdBorrowQty, r.rdAdminRoles, r.rdID);

            //Console.WriteLine(sql);
            return(Sq_h.run_rn(sql) == 1 ? true : false);
        }