示例#1
0
        public bool CreateAndSave(YandexDirectConfig config)
        {
            config.ProjectModule.Code        = ModuleCode;
            config.ProjectModule.CreatedTime = DateTime.Now;
            config.ProjectModule.ProjectId   = config.ProjectModule.ProjectId;

            return(Context.Repository.AddModule(config.ProjectModule) & Context.Repository.AddYandexDirectConfig(config));
        }
示例#2
0
        public bool SaveConfig(YandexDirectConfig config)
        {
            var projectModule = Context.Repository.GetModule(Id);

            projectModule.Name        = config.ProjectModule.Name;
            projectModule.Description = config.ProjectModule.Description;

            Configuration.PageLimit           =
                Configuration.ProjectModuleId = projectModule.Id;
            Configuration.AntigateId          = config.AntigateId;
            Configuration.HttpModuleId        = config.HttpModuleId;
            Configuration.Region    = config.Region;
            Configuration.PageLimit = config.PageLimit;

            return(Context.Repository.UpdateModule(projectModule) & Context.Repository.UpdateYandexDirectConfig(Configuration));
        }