public ReportTemplate SaveTemplate(ReportTemplate template) { if (template == null) { throw new ArgumentNullException("template"); } if (template.CreateOn == default(DateTime)) { template.CreateOn = TenantUtil.DateTimeNow(); } if (string.IsNullOrEmpty(template.CreateBy)) { template.CreateBy = SecurityContext.CurrentAccount.ID.ToString(); } return(reportDao.SaveTemplate(template)); }
public ReportTemplate SaveTemplate(ReportTemplate template) { if (template == null) { throw new ArgumentNullException("template"); } if (ProjectSecurity.IsVisitor(SecurityContext.CurrentAccount.ID)) { throw new SecurityException("Access denied."); } if (template.CreateOn == default(DateTime)) { template.CreateOn = TenantUtil.DateTimeNow(); } if (template.CreateBy.Equals(Guid.Empty)) { template.CreateBy = SecurityContext.CurrentAccount.ID; } return(reportDao.SaveTemplate(template)); }