コード例 #1
0
 // per copiare gli attributi comuni
 public void CopyAttributes(PagamentoAbstractModel model)
 {
     /*
      * this.DescriptionPayment = model.DescriptionPayment;
      * this.EmailReceivent = model.EmailReceivent;
      * this.ReturnUrlForFailed = model.ReturnUrlForFailed;
      * this.ReturnUrlForSuccess = model.ReturnUrlForSuccess;
      * this.Token = model.Token;
      * this.TotalPrice = model.TotalPrice;
      * this.TypePayment = model.TypePayment;
      * this.UrlRequest = model.UrlRequest;
      * this.WebSite = model.WebSite;
      * this.Test = model.Test;*/
     foreach (System.Reflection.PropertyInfo propertyInfo in model.GetType().GetProperties())
     {
         this.GetType().GetProperty(propertyInfo.Name).SetValue(this, propertyInfo.GetValue(model));
     }
 }
コード例 #2
0
 public SalvataggioPagamentoViewModel(PagamentoAbstractModel model) : base(model)
 {
 }
コード例 #3
0
 // se crei l'oggetto partendo da un altro tipo di oggetto,
 // questo costruttore copia direttamente gli attributi in comune
 public PagamentoAbstractModel(PagamentoAbstractModel model)
 {
     this.CopyAttributes(model);
 }
コード例 #4
0
 public PagamentoViewModel(PagamentoAbstractModel model) : base(model)
 {
 }