public void QuickLetter(string templateName) { var mailMergeViewModel = MailMergeViewModel <Employee, LinksViewModel> .Create(UnitOfWorkSource.GetUnitOfWorkFactory(), x => x.Employees, Entity == null?null as long? : Entity.Id, templateName, LinksViewModel.Create()); DocumentManagerService.CreateDocument("EmployeeMailMergeView", mailMergeViewModel, null, this).Show(); }
public void QuickLetter(string templateName) { var mailMergeViewModel = MailMergeViewModel <Order, LinksViewModel> .Create(UnitOfWorkFactory, x => x.Orders, GetSelectedEntityKey(), templateName, LinksViewModel.Create()); DocumentManagerService.CreateDocument("OrderMailMergeView", mailMergeViewModel, null, this).Show(); }