Ejemplo n.º 1
0
        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);
        }
Ejemplo n.º 2
0
        public FunctionListResult <ComponentConfig> GetComponentConfigList(int appConfigId, int version)
        {
            var r = new FunctionListResult <ComponentConfig>();

            r.Data = ComponentConfigDal.GetList(appConfigId, version);
            return(r);
        }
Ejemplo n.º 3
0
        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);
        }
Ejemplo n.º 4
0
        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);
        }
Ejemplo n.º 5
0
 public GridPager <ComponentConfig> GetPager(GridPagerPamater <ComponentConfigSearchPamater> searchParam)
 {
     var r = ComponentConfigDal.GetGridPager(searchParam); return(r);
 }
Ejemplo n.º 6
0
 public FunctionListResult <ComponentConfig> GetList(ComponentConfigSearchPamater pamater)
 {
     var r = new FunctionListResult <ComponentConfig>(); r.Data = ComponentConfigDal.GetList(pamater); return(r);
 }
Ejemplo n.º 7
0
 public FunctionResult <ComponentConfig> Get(int Id)
 {
     var r = new FunctionResult <ComponentConfig>(); r.Data = ComponentConfigDal.Get(Id); return(r);
 }
Ejemplo n.º 8
0
 public FunctionOpenResult <bool> DeleteByID(List <int> idList)
 {
     var r = new FunctionOpenResult <bool>(); r.Data = ComponentConfigDal.Delete(idList); return(r);
 }
Ejemplo n.º 9
0
 public FunctionOpenResult <bool> UpdateByID(ComponentConfig info)
 {
     var r = new FunctionOpenResult <bool>(); r.Data = ComponentConfigDal.Update(info) > 0; return(r);
 }