Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- IList<Template> templates = new List<Template>();
- foreach (string allowedTemplate in documentTypeModel.AllowedTemplates)
- {
- if(Convert.ToInt32(allowedTemplate) == -1)
- {
- Template template = new Template(documentType.Title, DateTime.Now);
- templates.Add(template);
- } else
- {
- Template template = TemplateRepository.Get(Convert.ToInt32(allowedTemplate));
- templates.Add(template);
- }
- }
- documentType.SetAllowedTemplates(templates);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement