public void SaveRecord(Record record, string currentUser, string procName) { SqlParameter[] sqlParams = record.SqlParameters(); System.Data.Common.DbCommand cmd = _db.GetStoredProcCommand(procName); AddParameters(cmd, sqlParams); AddParameters(cmd, new SqlParameter[] { new SqlParameter("CurrentUser", currentUser) }); record.Concurrency = Utilities.ToByteArray(_db.ExecuteScalar(cmd)); record.RecordId = (long)_db.GetParameterValue(cmd, record.TypeName + "ID"); }
public void SaveRecordExtended(Record record, string procName) { SqlParameter[] sqlParams = record.SqlParameters(); System.Data.Common.DbCommand cmd = _db.GetStoredProcCommand(procName); AddParameters(cmd, sqlParams); _db.ExecuteScalar(cmd); }
public void SaveRecord(Record record) { SqlParameter[] sqlParams = record.SqlParameters(); System.Data.Common.DbCommand cmd = _db.GetStoredProcCommand("procSave" + record.TypeName); AddParameters(cmd, sqlParams); record.Concurrency = Utilities.ToByteArray(_db.ExecuteScalar(cmd)); record.RecordId = (long)_db.GetParameterValue(cmd, record.TypeName + "ID"); }