예제 #1
0
 public MobileTransactionViewModel(MobileTransaction mobileTransaction)
 {
     ID = mobileTransaction.ID;
     MobileOperator = new MobileOperatorViewModel(mobileTransaction.MobileOperator);
     CreditSum = mobileTransaction.CreditSum;
     if (mobileTransaction.Transaction.Price != null) Price = mobileTransaction.Transaction.Price.Value;
     if (mobileTransaction.Transaction.Contragent != null) Client = new ContragentViewModel(mobileTransaction.Transaction.Contragent);
     Salesman = new SalesmanViewModel(mobileTransaction.Transaction.Operator.Salesman);
     Date = mobileTransaction.Transaction.Date;
     Profit = Price - CreditSum;
 }
예제 #2
0
 public MobileTransactionViewModel(MobileTransaction mobileTransaction)
 {
     ID             = mobileTransaction.ID;
     MobileOperator = new MobileOperatorViewModel(mobileTransaction.MobileOperator);
     CreditSum      = mobileTransaction.CreditSum;
     if (mobileTransaction.Transaction.Price != null)
     {
         Price = mobileTransaction.Transaction.Price.Value;
     }
     if (mobileTransaction.Transaction.Contragent != null)
     {
         Client = new ContragentViewModel(mobileTransaction.Transaction.Contragent);
     }
     Salesman = new SalesmanViewModel(mobileTransaction.Transaction.Operator.Salesman);
     Date     = mobileTransaction.Transaction.Date;
     Profit   = Price - CreditSum;
 }