示例#1
0
 public IEnumerable <T> GetAll <T>() where T : new()
 {
     return(DbUtil.GetAll <T>(Cs));
 }
示例#2
0
 public IEnumerable <Dossier> GetBy(int measuresetId, int measureId, int month, int?stateId = null)
 {
     return(DbUtil.ExecuteReaderSp <Dossier>("getDossiers", new { measuresetId, measureId, month, stateId }, Cs));
 }
示例#3
0
 public IEnumerable <Measure> GetActives()
 {
     return(DbUtil.ExecuteReaderSp <Measure>("getMeasures", null, Cs));
 }
示例#4
0
 public int UpdateWhatWhere <T>(object what, object where)
 {
     return(DbUtil.UpdateWhatWhere <T>(what, where, Cs));
 }
示例#5
0
 public IEnumerable <Field> GetUnassigned(int id)
 {
     return(DbUtil.ExecuteReaderSp <Field>("getUnassignedFieldsByFieldsetId", new { id }, Cs));
 }
示例#6
0
 public IEnumerable <T> GetWhere <T>(object where) where T : new()
 {
     return(DbUtil.GetWhere <T>(where, Cs));
 }
示例#7
0
 public int DeleteWhere <T>(object where)
 {
     return(DbUtil.DeleteWhere <T>(where, Cs));
 }
示例#8
0
 public int Count(string name)
 {
     return(DbUtil.CountWhere <User>(new { name }, Cs));
 }
示例#9
0
 public IEnumerable <Role> GetRoles()
 {
     return(DbUtil.GetAll <Role>(Cs));
 }
示例#10
0
 public void MoveToFpi(int fpiId)
 {
     DbUtil.ExecuteNonQuerySp("updateToFpi", new { fpiId }, Cs);
 }
示例#11
0
 public IEnumerable <Role> GetRoles(long id)
 {
     return(DbUtil.ExecuteReaderSp <Role>("getRolesByUserId", new { id }, Cs));
 }
示例#12
0
 public void RollbackToIndicators(int fpiId)
 {
     DbUtil.ExecuteNonQuerySp("rollbackToIndicators", new { fpiId }, Cs);
 }
示例#13
0
 public int RollbackWinners(int fpiId)
 {
     return(DbUtil.ExecuteNonQuerySp("rollbackWinners", new { fpiId }, Cs));
 }
示例#14
0
 public IEnumerable <RankedDossier> GetForRanking(int measuresetId, int measureId, int month)
 {
     return(DbUtil.ExecuteReaderSp <RankedDossier>("getDossiersForRanking", new { measuresetId, measureId, month }, Cs));
 }
示例#15
0
 public T Get <T>(int id) where T : new()
 {
     return(DbUtil.Get <T>(id, Cs));
 }
示例#16
0
 public int UpdatePassword(int id, string password)
 {
     return(DbUtil.UpdateWhatWhere <User>(new { password }, new { id }, Cs));
 }
示例#17
0
 public int Delete <T>(int id) where T : new()
 {
     return(DbUtil.Delete <T>(id, Cs));
 }
示例#18
0
 public IEnumerable <IndicatorValue> GetBy(int fpiId)
 {
     return(DbUtil.ExecuteReaderSp <IndicatorValue>("getIndicatorValues", new { fpiId }, Cs));
 }
示例#19
0
 public int InsertNoIdentity(object o)
 {
     return(DbUtil.InsertNoIdentity(o, Cs));
 }
示例#20
0
 public IEnumerable <int> GetUsedIn(DateTime month)
 {
     return(DbUtil.ExecuteReaderSpValueType <int>("getUsedMeasureIds", Cs, new { month }));
 }
示例#21
0
 public int Insert(object o)
 {
     return(DbUtil.Insert(o, Cs));
 }
示例#22
0
 public IEnumerable <Measure> GetUnassigned(int measuresetId)
 {
     return(DbUtil.ExecuteReaderSp <Measure>("getUnassignedMeasures", new { measuresetId }, Cs));
 }
示例#23
0
 public IEnumerable <Competitor> Losers(int fpiId)
 {
     return(DbUtil.ExecuteReaderSp <Competitor>("getLosers", new { fpiId }, Cs));
 }
示例#24
0
 public int Unassign(int measureId, int measuresetId)
 {
     return(DbUtil.ExecuteNonQuerySp("unassignMeasure", new { measureId, measuresetId }, Cs));
 }
示例#25
0
 public int UnassignField(int fieldId, int fieldsetId)
 {
     return(DbUtil.ExecuteNonQuerySp("unassignField", new { fieldId, fieldsetId }, Cs));
 }
示例#26
0
 public int ChangeState(int id, DossierStates stateId)
 {
     return(DbUtil.ExecuteNonQuerySp("changeDossierState", new { id, stateId }, Cs));
 }