public ViewResult SavePersonOffice(TemplateModelOffice templateModel) { if (ModelState.IsValid) { //Put your code here to use data to generate the tamplate // create a pdf from the generated template //add the url for the PDF here so they can download it SignUtilities util = new SignUtilities(host); try { string fileName = util.CreateSignOffice(templateModel.EmployeesOffice); TempData["GeneratedFile"] = fileName; } catch (Exception ex) { Console.WriteLine(ex); } return(View("Results")); } else { ModelState.AddModelError("", "Please correct the highlighted error below."); return(View("Office", templateModel)); } }
public SignViewModel(IFrameNavigationService navigationService) { _navigationService = navigationService; SignIn = new RelayCommand <Tuple <string, string> >(async logpas => { Doctor = await SignUtilities.GetDoctor(logpas); RaisePropertyChanged(nameof(Doctor)); Messenger.Default.Send <Doctor>(Doctor, "Doctor"); _navigationService.NavigateTo("Doctor"); }); SignUp = new RelayCommand <Doctor>(async doc => { Doctor = await SignUtilities.NewDoctor(doc); RaisePropertyChanged(nameof(Doctor)); _navigationService.NavigateTo("Doctor"); }); }
public ViewResult SavePersonElevator(TemplateModelMisc templateModel) { if (ModelState.IsValid) { SignUtilities util = new SignUtilities(host); try { string fileName = util.CreateSignDepartment(templateModel.EmployeesMisc); TempData["GeneratedFile"] = fileName; } catch { } return(View("Results")); } else { ModelState.AddModelError("", "Please correct the highlighted error below."); return(View("Elevator", templateModel)); } }
/// <summary> /// Executes the specified context. /// </summary> /// <param name="context">The context.</param> public void Execute(IJobExecutionContext context) { SignUtilities.UpdateAllSigns(); context.Result = "Completed initializing asynchronous update of signs. (This does not mean all signs have finished updating)"; }
private void UpdateSigns(int signCategoryId) { SignUtilities.UpdateSignCategorySigns(signCategoryId); }