Beispiel #1
0
 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);
 }
Beispiel #2
0
 public bool Delete(BaseEntitie ent)
 {
     return dao.Delete(ent, null) > 0;
 }
Beispiel #3
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);
     }
 }
Beispiel #4
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuSchedule Where ScheduleId = @ScheduleId";
     return RunCommandWithTransatcion((BuSchedule)ent, s_DelSQL, TRANS);
 }
Beispiel #5
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuGastankInfo Where TankNumber = @TankNumber";
     return RunCommandWithTransatcion((BuGastankInfo)ent, s_DelSQL, TRANS);
 }
Beispiel #6
0
 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);
 }
Beispiel #7
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuWFProcess Where ProcessId = @ProcessId";
     return RunCommandWithTransatcion((BuWFProcess)ent, s_DelSQL, TRANS);
 }
Beispiel #8
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuCityInfo Where CityCode = @CityCode";
     return RunCommandWithTransatcion((BuCityInfo)ent, s_DelSQL, TRANS);
 }
Beispiel #9
0
 public void Add(BaseEntitie obj)
 {
     sqlColltion.Add(obj);
     return;
 }
Beispiel #10
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuGastankRepair Where GasRepairId = @GasRepairId";
     return RunCommandWithTransatcion((BuGastankRepair)ent, s_DelSQL, TRANS);
 }
Beispiel #11
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuGPSLog Where GPSLogId = @GPSLogId";
     return RunCommandWithTransatcion((BuGPSLog)ent, s_DelSQL, TRANS);
 }
Beispiel #12
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuWFRelationship Where RelationshipId = @RelationshipId";
     return RunCommandWithTransatcion((BuWFRelationship)ent, s_DelSQL, TRANS);
 }
Beispiel #13
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuWorkFlow Where WorkflowGUID = @WorkflowGUID";
     return RunCommandWithTransatcion((BuWorkFlow)ent, s_DelSQL, TRANS);
 }
Beispiel #14
0
 public bool Insert(BaseEntitie ent)
 {
     return dao.Insert(ent, null) > 0;
 }
Beispiel #15
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " Delete From BuBigStationInfo Where BigStationId = @BigStationId";
     return RunCommandWithTransatcion((BuBigStationInfo)ent, s_DelSQL, TRANS);
 }
Beispiel #16
0
 public bool Update(BaseEntitie ent)
 {
     return dao.Update(ent, null) > 0;
 }
Beispiel #17
0
 public int Delete(BaseEntitie ent, IDbTransaction TRANS)
 {
     string s_DelSQL = " DELETE FROM syslog   WHERE  ID=@ID ";
     return RunCommandWithTransatcion((syslogInfo)ent, s_DelSQL, TRANS);
 }