public OperateResponse GetModel(string dataGroupTag, string dataName) { return(Excute(() => { var resultdata = new Sys_ConfigDoMain().GetDataValue(dataGroupTag, dataName); return Success(resultdata); })); }
public ResponseEntity <Sys_ConfigResponse> GetModel(int ID) { return(ExcuteEntity(() => { var resultdata = new Sys_ConfigDoMain().GetModel(e => e.ID == ID); var data = Sys_ConfigResponse.FromEntity(resultdata); return SuccessEntity(data); })); }
public OperateResponse RemoveList(CommonRequest Model) { return(Excute(() => { Sys_ConfigDoMain datadomain = new Sys_ConfigDoMain(); Expression <Func <Sys_Config, bool> > queryWhere = (e => Model.IDS.Contains(e.ID.ToString())); int rownum = datadomain.DelBy(queryWhere); return Success(string.Format("操作成功!影响数据{0}行", rownum)); })); }
public OperateResponse ModelCreate(Sys_ConfigRequest model) { return(Excute(() => { var data = model.ToEntity(); data.ModelCreate(); Sys_ConfigDoMain datadomain = new Sys_ConfigDoMain(); var resultdata = datadomain.Add(data); return Success(); })); }
public QjResponse <Sys_ConfigResponse> GetList(int Index = 1, int Size = 15) { return(Excute(() => { Expression <Func <Qj.Models.Sys_Config, bool> > queryWhere = ExpressionExtension.True <Qj.Models.Sys_Config>(); int Datacount = 0; var Listdata = new Sys_ConfigDoMain().GetPagedList(Index, Size, ref Datacount, queryWhere, (e => e.InDate), true); var list = (from m in Listdata select Sys_ConfigResponse.FromEntity(m)).ToList(); return Success(list, Datacount); })); }
public OperateResponse ModelEdit(Sys_ConfigRequest model) { return(Excute(() => { var datadomain = new Sys_ConfigDoMain(); Sys_Config data = datadomain.GetModel(e => e.ID == model.ID); if (data == null) { return Fail("未找到这条数据!"); } data = model.ToEntity(data); data.ModelEdit(); int flag = datadomain.Modify(data); return Success(); })); }