/// <summary> /// 执行UPDATE[对象式参数],返回受影响行数,发生异常返回-999 /// </summary> /// <returns></returns> public int Update <Q>(string sqlhalf, Q paraentity) { string sql = DBMO.AutoCmptUpdateSql(sqlhalf, this.paraPrefixChar); this.InItCmd <Q>(sql, paraentity); return(this.SelectNon()); }
/// <summary> /// 执行UPDATE[字典式参数],返回受影响行数,发生异常返回-999 /// </summary> public int Update(string sqlhalf, Dictionary <string, object> parasdict) { string sql = DBMO.AutoCmptUpdateSql(sqlhalf, this.paraPrefixChar); this.InItCmd(sql, parasdict); return(this.SelectNon()); }
/// <summary> /// 执行INSERT[对象式参数],返回受影响行数,发生异常返回-999 /// </summary> public int Insert <Q>(string insertHalf, Q paraentity) { string sql = DBMO.AutoCmptInsertSql(insertHalf, this.paraPrefixChar); this.InItCmd <Q>(sql, paraentity); return(this.SelectNon()); }
/// <summary> /// 执行UPDATE[数组式参数],返回受影响行数,发生异常返回-999 /// <para>UPDATE语句不需要写SET部分.写出要赋值的字段.程序将自动补齐SET部分否则出错</para> /// <para>例: update tab (col1,col2,...) where id=1</para> /// </summary> public int Update(string sqlhalf, params object[] paras) { string sql = DBMO.AutoCmptUpdateSql(sqlhalf, this.paraPrefixChar); this.InItCmd(sql, paras); return(this.SelectNon()); }
/// <summary> /// 执行INSERT[字典式参数],返回受影响行数,发生异常返回-999 /// </summary> public int Insert(string insertHalf, Dictionary <string, object> parasdict) { string sql = DBMO.AutoCmptInsertSql(insertHalf, this.paraPrefixChar); this.InItCmd(sql, parasdict); return(this.SelectNon()); }