public bool Delete(string Id) { db.SetConnection(); string s = "DELETE FROM composite_isotopics_rec where isotopics_id = " + SQLSpecific.QVal(Id); return(db.Execute(s)); }
public bool Delete(long rid) { db.SetConnection(); string s = "DELETE FROM results_rec where id=" + rid.ToString(); return(db.Execute(s)); }
public bool Delete(String Id) { db.SetConnection(); string s = "DELETE FROM collar_data_entry where item_name = " + SQLSpecific.QVal(Id);; return(db.Execute(s)); }
public bool Update(ElementList sParams) { db.SetConnection(); string sSQL = "UPDATE cm_pu_ratio_rec SET "; sSQL += sParams.ColumnEqValueList; return(db.Execute(sSQL)); }
public bool Update(ElementList sParams) // all of them and all them's's columns { db.SetConnection(); string sSQL = "UPDATE test_parms_rec SET "; sSQL += sParams.ColumnEqValueList; return(db.Execute(sSQL)); }
public bool Update(string name, DateTime dt, ElementList sParams) { db.SetConnection(); string sSQL1 = "UPDATE HVResult SET "; string wh = " where detector_id=" + SQLSpecific.QVal(name) + " AND HVPDateTime=" + SQLSpecific.getDate(dt); string sSQL = sSQL1 + sParams.ColumnEqValueList + wh; return(db.Execute(sSQL)); }
public bool Update(ElementList sParams) { DataRow dr = null; string table = "LMINCCAppContext"; dr = Get(); if (dr == null) { string sSQL = "Insert into " + table; sSQL += sParams.ColumnsValues; return(db.Execute(sSQL)); } else { string sSQL1 = "UPDATE " + table + " SET "; string sSQL = sSQL1 + sParams.ColumnEqValueList; return(db.Execute(sSQL)); } }
public bool Update(ElementList collar, ElementList collar_det, ElementList k5) { bool success = false; db.SetConnection(); ArrayList sqlList = new ArrayList(); string sSQL = "UPDATE collar_rec SET "; sSQL += collar.ColumnsValues; sqlList.Add(sSQL); sqlList.Add(SQLSpecific.getLastID("collar_rec")); success = db.Execute(sqlList) == -1?false:true; sqlList = new ArrayList(); // The collar is made of three records. One is in collar_rec, one in collar_detector, and one in collar_k5 sSQL = "UPDATE collar_detector_rec SET "; sSQL += collar_det.ColumnsValues; sqlList.Add(sSQL); sqlList.Add(SQLSpecific.getLastID("collar_detector_rec")); success = success || db.Execute(sqlList) == -1 ? false : true; sqlList = new ArrayList(); // The collar is made of three records. One is in collar_rec, one in collar_detector, and one in collar_k5 sSQL = "UPDATE collar_k5_rec SET"; sSQL += k5.ColumnsValues; sqlList.Add(sSQL); sqlList.Add(SQLSpecific.getLastID("collar_k5_rec")); success = success || db.Execute(sqlList) == -1 ? false : true; return(success); }
// TODO: update results and method results in same step public bool unraeadyUpdate(string detname, DateTime date, ElementList resParams, ElementList methodParams) { db.SetConnection(); Measurements ms = new Measurements(db); ArrayList sqlList = new ArrayList(); //....... long l = ms.PrimaryKey(detname, date); string sSQL1 = "UPDATE " + table + " SET "; string wh = " where mid=" + l.ToString(); string sSQL = sSQL1 + resParams.ColumnEqValueList + wh; return(db.Execute(sSQL)); }
// delete the named stratum association with a detector public bool Delete(string measDetId, string stratumId) { db.SetConnection(); Detectors dets = new Detectors(db); long l = dets.PrimaryKey(measDetId); long m = PrimaryKey(stratumId); string sSQL = "DELETE FROM stratum_id_detector where " + "(stratum_id_detector.stratum_id=" + m.ToString() + " AND stratum_id_detector.detector_id=" + l.ToString() + ")"; return(db.Execute(sSQL)); }