public static void CreateContentTemplate(ContentTemplate contentTemplate, Stream attchement, string filePath, string fileName, bool keepOrignialFileName)
        {
            try
            {
                string uploadedfileName;
                ContentTemplateDAO contentTemplateDAO = new ContentTemplateDAO();
                contentTemplateDAO.CreateContentTemplate(contentTemplate);

                if (attchement.Length > 0)
                {
                    uploadedfileName = Utility.UploadService.UploadDocument(attchement, filePath, fileName, keepOrignialFileName);
                    ContentTemplateAttachement contentTemplateAttachement = new ContentTemplateAttachement();
                    contentTemplateAttachement.AttachementDocument = uploadedfileName;
                    contentTemplateAttachement.ContentTemplateID = contentTemplate.ContentTemplateID;
                    ContentTemplateAttachementService.CreateContentTemplateAttachement(contentTemplateAttachement);
                }
            }
            catch (ApplicationException)
            {
                throw;
            }
            catch (Exception ex)
            {
                // log this exception
                log4net.Util.LogLog.Error(ex.Message, ex);
                // wrap it and rethrow
                throw new ApplicationException(SR.BusinessCreateContentTemplateException, ex);
            }
        }
 public static void CreateContentTemplate(ContentTemplate contentTemplate)
 {
     try
     {
         ContentTemplateDAO contentTemplateDAO = new ContentTemplateDAO();
         contentTemplateDAO.CreateContentTemplate(contentTemplate);
     }
     catch (ApplicationException)
     {
         throw;
     }
     catch (Exception ex)
     {
         // log this exception
         log4net.Util.LogLog.Error(ex.Message, ex);
         // wrap it and rethrow
         throw new ApplicationException(SR.BusinessCreateContentTemplateException, ex);
     }
 }