Esempio n. 1
0
        public FunctionOpenResult <bool> Add(List <AppService> data, int appInstanceId)
        {
            var r = new FunctionOpenResult <bool>();

            r.Data = false;
            if (data != null)
            {
                Rel_AppInstance_AppServiceDal.Add(new Rel_AppInstance_AppService()
                {
                    AppInstanceId = appInstanceId,
                    AppService    = JsonHelper.Serlaize <List <AppService> >(data)
                });

                r.Data = true;
            }
            return(r);
        }
Esempio n. 2
0
        public FunctionOpenResult <bool> RecordAppService(List <AppService> data, int appInstanceId)
        {
            FunctionOpenResult <bool> r = new FunctionOpenResult <bool>();

            r.Data = Rel_AppInstance_AppServiceDal.UpdateAppInstanceId(new Rel_AppInstance_AppService()
            {
                AppInstanceId = appInstanceId,
                AppService    = JsonHelper.Serlaize <List <AppService> >(data),
                IsCompare     = r.Data
            }) > 0;
            if (!r.Data)
            {
                r.Data = Rel_AppInstance_AppServiceDal.Add(new Rel_AppInstance_AppService()
                {
                    AppInstanceId = appInstanceId,
                    AppService    = JsonHelper.Serlaize <List <AppService> >(data),
                    IsCompare     = r.Data
                }) > 0;
            }
            return(r);
        }