public ActionsController(ILogger <ActionsController> logger, ActionsService actionService, IProviderType glProvider, IOptions <ViewOptions> options, IOptions <JournalOptions> journalOptions) { _logger = logger; _actionService = actionService; _glProvider = glProvider; _options = options.Value; _journalOptions = journalOptions.Value; }
public ActionsServiceTests() { _fileServiceMock = new Mock <IFileService>(); _coverageDataConverterMock = new Mock <ICoverageDataConverter>(); _coverageFileValidatorMock = new Mock <ICoverageFileValidator>(); _granuleServiceMock = new Mock <IGranuleService>(); var printGranuleServiceMock = new Mock <IPrintGranuleService>(); var printGranSetServiceMock = new Mock <IPrintGranSetService>(); _actionsService = new ActionsService(_fileServiceMock.Object, printGranuleServiceMock.Object, _coverageDataConverterMock.Object, _coverageFileValidatorMock.Object, _granuleServiceMock.Object, printGranSetServiceMock.Object); }
public ActionResult Remove(int id) { bool success = ActionsService.Remove(id); if (success) { return(Json(base.RespResult(true, "删除成功!"))); } else { return(Json(base.RespResult(false, "删除失败,请稍后重试!"))); } }
public IEnumerable <Actions> GetUserActionList(int userId) { var r = from u in SysUserService.GetQueryList() join ur in RelUserRoleService.GetQueryList() on u.Id equals ur.UserId join ra in RelRoleActionService.GetQueryList() on ur.RoleId equals ra.RoleId join act in ActionsService.GetQueryList() on ra.ActionId equals act.ID where u.Id == userId select act; return(r.ToList()); }
public TelegramService(string botToken, int telegram_id) { _logger = LogManager.GetCurrentClassLogger(); _telegramId = telegram_id; _telegramBotClient = new TelegramBotClient(botToken); _actionsService = new ActionsService(); // StartReceiving does not block the caller thread. Receiving is done on the ThreadPool. ReceiverOptions receiverOptions = new() { AllowedUpdates = { } }; using var cts = new CancellationTokenSource(); { _telegramBotClient.StartReceiving(HandleUpdateAsync, HandleErrorAsync, receiverOptions, cts.Token); } }
public ActionResult Create(string name, string begint, string endt, string content) { Actions action = new Actions { name = name, begint = begint, endt = endt, content = content }; bool success = ActionsService.Create(action); if (success) { ViewData["resp"] = base.RespResult(true, "添加成功!!"); } else { ViewData["resp"] = base.RespResult(false, "操作失败,请稍后重试!"); } return(View()); }
private void GenerateT4File(string templateName, string outputFileName, string path) { IDictionary <string, object> templateParameters = new Dictionary <string, object>(StringComparer.OrdinalIgnoreCase); templateParameters.Add("Namespace", Context.ActiveProject.GetDefaultNamespace()); Contract.Assert(AppStartFileNames != null); foreach (KeyValuePair <string, string> appStartFileNames in AppStartFileNames) { templateParameters.Add(appStartFileNames.Key, appStartFileNames.Value); } string codeFileExtension = Context.ActiveProject.GetCodeLanguage().CodeFileExtension; string outputPath = Path.Combine(path, outputFileName); string templatePath = FilesLocatorService.GetTextTemplatePath(templateName, SearchFolders, codeFileExtension); ActionsService.AddFileFromTemplate( Context.ActiveProject, outputPath, templatePath, templateParameters, skipIfExists: true); }
public ActionsController(ActionsService actionsService) { this.actionsService = actionsService; }
public ActionResult Detail(int id) { return(View(ActionsService.GetById(id))); }
// // GET: /Center/ public ActionResult Index() { return(View(ActionsService.RetrievesAll())); }
public ActionsController(ApiContext context) { this.actionsService = new ActionsService(context); }
protected virtual void CreateStaticFilesAndFolders() { ActionsService.CreateAppDataFolder(Context.ActiveProject); ActionsService.AddFolder(Context.ActiveProject, CommonFolderNames.AppStart); }
internal static void CreateActionsForFolders(decimal idIn, decimal idOut, decimal idInArch, decimal idOutArch, string nome, string idNome) { List <ActiveUp.Net.Common.DeltaExt.Action> actions = new List <ActiveUp.Net.Common.DeltaExt.Action>(); ActiveUp.Net.Common.DeltaExt.Action actionin = new ActiveUp.Net.Common.DeltaExt.Action(); actionin.IdDestinazione = decimal.Parse(idNome); actionin.IdFolderDestinazione = (int)idIn; actionin.NomeAzione = "SPOSTA IN " + nome; actionin.TipoAzione = "SP"; actions.Add(actionin); ActiveUp.Net.Common.DeltaExt.Action actionout = new ActiveUp.Net.Common.DeltaExt.Action(); actionout.IdDestinazione = decimal.Parse(idNome); actionout.IdFolderDestinazione = (int)idOut; actionout.NomeAzione = "SPOSTA IN " + nome; actionout.TipoAzione = "SP"; actions.Add(actionout); // archivio ActiveUp.Net.Common.DeltaExt.Action actioninArch = new ActiveUp.Net.Common.DeltaExt.Action(); actioninArch.IdDestinazione = decimal.Parse(idNome); actioninArch.IdFolderDestinazione = (int)idInArch; actioninArch.NomeAzione = "SPOSTA IN " + nome; actioninArch.TipoAzione = "SP"; actions.Add(actioninArch); ActiveUp.Net.Common.DeltaExt.Action actionoutArch = new ActiveUp.Net.Common.DeltaExt.Action(); actionoutArch.IdDestinazione = decimal.Parse(idNome); actionoutArch.IdFolderDestinazione = (int)idOutArch; actionoutArch.NomeAzione = "SPOSTA IN " + nome; actionoutArch.TipoAzione = "SP"; actions.Add(actionoutArch); ActionsService actService = new ActionsService(); try { actService.Insert(actions); List <ActionFolder> actionsFolders = new List <ActionFolder>(); // inserimento azioni e collegamento con folders ActionFolder afInbox = new ActionFolder(); afInbox.idAction = actionin.Id; afInbox.idFolder = 1; actionsFolders.Add(afInbox); ActionFolder afNewFolder = new ActionFolder(); afNewFolder.idAction = 4; afNewFolder.idFolder = idIn; actionsFolders.Add(afNewFolder); ActionFolder afOutBox = new ActionFolder(); afOutBox.idAction = actionout.Id; afOutBox.idFolder = 2; actionsFolders.Add(afOutBox); ActionFolder afNewFolderOut = new ActionFolder(); afNewFolderOut.idAction = 6; afNewFolderOut.idFolder = idOut; actionsFolders.Add(afNewFolderOut); // ARCHIVI ActionFolder afInboxArch = new ActionFolder(); afInboxArch.idAction = actioninArch.Id; afInboxArch.idFolder = 5; actionsFolders.Add(afInboxArch); ActionFolder afNewFolderArch = new ActionFolder(); afNewFolderArch.idAction = 4; afNewFolderArch.idFolder = idInArch; actionsFolders.Add(afNewFolderArch); ActionFolder afOutBoxArch = new ActionFolder(); afOutBoxArch.idAction = actionoutArch.Id; afOutBoxArch.idFolder = 7; actionsFolders.Add(afOutBoxArch); ActionFolder afNewFolderOutArch = new ActionFolder(); afNewFolderOutArch.idAction = 6; afNewFolderOutArch.idFolder = idOutArch; actionsFolders.Add(afNewFolderOutArch); ActionsFoldersService service = new ActionsFoldersService(); service.Insert(actionsFolders); } catch (Exception ex) { ManagedException mEx = new ManagedException(ex.Message, "FOL_APP001", string.Empty, string.Empty, ex); ErrorLogInfo er = new ErrorLogInfo(mEx); log.Error(er); throw mEx; } }
public IntacctSyncController(ILogger <IntacctSyncController> logger, ActionsService actionService, IntacctSyncService intacctService) { _logger = logger; _actionService = actionService; _intacctService = intacctService; }
public HealthCheckController(IFactory factory, ActionsService service) { _factory = factory; _servive = service; }