public FunctionOpenResult <bool> AddComponentConfigForApp(int componentConfigId, int appConfigId) { var r = new FunctionOpenResult <bool>(); var data = Rel_AppConfig_ComponentConfigDal.Get(appConfigId, componentConfigId); if (data != null) { r.Data = false; r.ErrorMsg = "此数据已存在"; return(r); } var appConfig = AppConfigDal.Get(appConfigId); var componentConfig = ComponentConfigDal.Get(componentConfigId); if (componentConfig == null) { r.Data = false; r.ErrorMsg = "此组件配置不存在"; return(r); } if ((appConfig != null) && (componentConfig != null)) { r.Data = Rel_AppConfig_ComponentConfigDal.Add(new Rel_AppConfig_ComponentConfig() { AppConfigId = appConfig.AppConfigId, AppConfigVersion = appConfig.Version, ComponentConfigId = componentConfig.ComponentConfigId, ComponentConfigVersion = componentConfig.Version, SolutionID = appConfig.SolutionID }) > 0; } return(r); }
public FunctionListResult <ComponentConfig> GetComponentConfigList(int appConfigId, int version) { var r = new FunctionListResult <ComponentConfig>(); r.Data = ComponentConfigDal.GetList(appConfigId, version); return(r); }
public FunctionResult <ComponentConfig> Create(ComponentConfig info) { var r = new FunctionResult <ComponentConfig>(); int id = ComponentConfigDal.Add(info); if (id > 0) { r.Data = info; r.Data.ComponentConfigId = id; } return(r); }
public FunctionResult <AppConfig> SendConfig(String solutionID, int version) { var r = new FunctionResult <AppConfig>(); var appConfig = AppConfigDal.Get(solutionID, version); if (appConfig != null) { List <ComponentConfig> list = ComponentConfigDal.GetList(appConfig.AppConfigId, appConfig.Version); appConfig.Components = list; r.Data = appConfig; } else { r.ErrorMsg = "无获取app的配置数据"; r.Data = null; } return(r); }
public GridPager <ComponentConfig> GetPager(GridPagerPamater <ComponentConfigSearchPamater> searchParam) { var r = ComponentConfigDal.GetGridPager(searchParam); return(r); }
public FunctionListResult <ComponentConfig> GetList(ComponentConfigSearchPamater pamater) { var r = new FunctionListResult <ComponentConfig>(); r.Data = ComponentConfigDal.GetList(pamater); return(r); }
public FunctionResult <ComponentConfig> Get(int Id) { var r = new FunctionResult <ComponentConfig>(); r.Data = ComponentConfigDal.Get(Id); return(r); }
public FunctionOpenResult <bool> DeleteByID(List <int> idList) { var r = new FunctionOpenResult <bool>(); r.Data = ComponentConfigDal.Delete(idList); return(r); }
public FunctionOpenResult <bool> UpdateByID(ComponentConfig info) { var r = new FunctionOpenResult <bool>(); r.Data = ComponentConfigDal.Update(info) > 0; return(r); }