public int Insert(BaseEntitie ent, IDbTransaction TRANS) { StringBuilder insSQL = new StringBuilder(" Insert Into BuSchedule ("); bool isFirstValue = true; StringBuilder sp = new StringBuilder(); ColumnCollection _column = ent.Column; for (int i = 0; i < _column.Count; i++) { if (isFirstValue) { isFirstValue = false; insSQL.Append(_column[i].FieldName); sp.Append("@" + _column[i].FieldName); } else { insSQL.Append("," + _column[i].FieldName); sp.Append(",@" + _column[i].FieldName); } } insSQL.Append(") values (" + sp.ToString() + ")"); return RunCommandWithTransatcion((BuSchedule)ent, insSQL.ToString(), TRANS); }
public bool Delete(BaseEntitie ent) { return dao.Delete(ent, null) > 0; }
protected virtual void GetEntityDeleteParameter(System.Data.IDbCommand CM, BaseEntitie ent) { ColumnCollection _column = ent.Column; for (int i = 0; i < _column.Count; i++) { System.Data.IDbDataParameter sParameter = CM.CreateParameter(); sParameter.ParameterName = _column[i].FieldName; sParameter.Value = _column[i].FieldValue; sParameter.DbType = _column[i].FieldType; CM.Parameters.Add(sParameter); } }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuSchedule Where ScheduleId = @ScheduleId"; return RunCommandWithTransatcion((BuSchedule)ent, s_DelSQL, TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuGastankInfo Where TankNumber = @TankNumber"; return RunCommandWithTransatcion((BuGastankInfo)ent, s_DelSQL, TRANS); }
public int Update(BaseEntitie ent, IDbTransaction TRANS) { StringBuilder s_UpdSQL = new StringBuilder(" Update BuSchedule Set "); bool isFirstValue = true; ColumnCollection _column = ent.Column;//entity.TableFieldsName; for (int i = 0; i < _column.Count; i++) { if (isFirstValue) { isFirstValue = false; s_UpdSQL.Append(_column[i].FieldName); s_UpdSQL.Append("="); s_UpdSQL.Append("@" + _column[i].FieldName); } else { s_UpdSQL.Append("," + _column[i].FieldName); s_UpdSQL.Append("="); s_UpdSQL.Append("@" + _column[i].FieldName); } } s_UpdSQL.Append(" WHERE ScheduleId = @ScheduleId"); return RunCommandWithTransatcion((BuSchedule)ent, s_UpdSQL.ToString(), TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuWFProcess Where ProcessId = @ProcessId"; return RunCommandWithTransatcion((BuWFProcess)ent, s_DelSQL, TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuCityInfo Where CityCode = @CityCode"; return RunCommandWithTransatcion((BuCityInfo)ent, s_DelSQL, TRANS); }
public void Add(BaseEntitie obj) { sqlColltion.Add(obj); return; }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuGastankRepair Where GasRepairId = @GasRepairId"; return RunCommandWithTransatcion((BuGastankRepair)ent, s_DelSQL, TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuGPSLog Where GPSLogId = @GPSLogId"; return RunCommandWithTransatcion((BuGPSLog)ent, s_DelSQL, TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuWFRelationship Where RelationshipId = @RelationshipId"; return RunCommandWithTransatcion((BuWFRelationship)ent, s_DelSQL, TRANS); }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuWorkFlow Where WorkflowGUID = @WorkflowGUID"; return RunCommandWithTransatcion((BuWorkFlow)ent, s_DelSQL, TRANS); }
public bool Insert(BaseEntitie ent) { return dao.Insert(ent, null) > 0; }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " Delete From BuBigStationInfo Where BigStationId = @BigStationId"; return RunCommandWithTransatcion((BuBigStationInfo)ent, s_DelSQL, TRANS); }
public bool Update(BaseEntitie ent) { return dao.Update(ent, null) > 0; }
public int Delete(BaseEntitie ent, IDbTransaction TRANS) { string s_DelSQL = " DELETE FROM syslog WHERE ID=@ID "; return RunCommandWithTransatcion((syslogInfo)ent, s_DelSQL, TRANS); }