Esempio n. 1
0
 public NewTypeTemplate NewType(Authentication authentication)
 {
     this.DataBase.ValidateBeginInDataBase(authentication);
     this.CremaHost.DebugMethod(authentication, this, nameof(NewType), this);
     var template = new NewTypeTemplate(this);
     template.BeginEdit(authentication);
     return template;
 }
Esempio n. 2
0
 public NewTypeTemplate NewType(Authentication authentication)
 {
     try
     {
         this.DataBase.ValidateBeginInDataBase(authentication);
         this.CremaHost.DebugMethod(authentication, this, nameof(NewType), this);
         var template = new NewTypeTemplate(this);
         template.BeginEdit(authentication);
         return(template);
     }
     catch (Exception e)
     {
         this.CremaHost.Error(e);
         throw;
     }
 }
Esempio n. 3
0
 public void Attach(NewTypeTemplate template)
 {
     template.EditCanceled += (s, e) => this.templateList.Remove(template);
     template.EditEnded    += (s, e) => this.templateList.Remove(template);
     this.templateList.Add(template);
 }