/// <summary> /// 查询语句 /// 支持多查询条件 /// </summary> /// <returns></returns> public DataSet SelectSingle(IDvTable Table) { StockCmd ss = CreateSelectCmd(Table); CommandType cmdtype = CommandType.Text; return(this.oradbh.GetDataSet(ss.Cmd, cmdtype, ss.Parameter.ToArray())); }
/// <summary> /// 修改数据 /// </summary> /// <param name="Table"></param> /// <returns></returns> public int Update(IDvTable Table) { StockCmd isert = CreateUpdateCmd(Table); CommandType cmdtype = CommandType.Text; return(this.oradbh.ExecuteNonQuery(isert.Cmd, cmdtype, isert.Parameter.ToArray())); }
/// <summary> /// 把表对象的属性都作为字段添加到插入语句中 /// </summary> /// <param name="Table"></param> /// <returns></returns> public int Insert(IDvTable Table) { StockCmd isert = CreateInsertCmd(Table); CommandType cmdtype = CommandType.Text; return(this.accdbh.ExecteNonQuery(isert.Cmd, cmdtype, isert.Parameter.ToArray())); }
/// <summary> /// 事务操作 /// </summary> protected int TranOpration(List <IDvTable> Tables, bool IsRollBack, DlgTranStockCmd Dtsc) { int result = 0; this.oradbh.BeginTran(); CommandType cmdtype = CommandType.Text; foreach (IDvTable tab in Tables) { StockCmd cmd = Dtsc(tab); int i = this.oradbh.ExecuteTran(cmd.Cmd, cmdtype, cmd.Parameter.ToArray()); if (IsRollBack && i == 0) { this.oradbh.RollBackTran(); return(0); } result = result + i; } this.oradbh.CommitTran(); return(result); }