示例#1
0
 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");
 }
示例#2
0
 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);
 }
示例#3
0
 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");
 }