Advertisement
Guest User

rapport

a guest
Feb 28th, 2020
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 3.44 KB | None | 0 0
  1. using Alphafolio.Tools.Configuration;
  2. using Alphafolio.Tools.Formatting;
  3. using System;
  4. using System.Linq;
  5. using System.Collections.Generic;
  6.  
  7. namespace Alphafolio.DAL.Model
  8. {
  9.     public partial class ContractCommitment
  10.     {
  11.  
  12.         #region Contract
  13.        
  14.         public String EP_Code
  15.         {
  16.             get
  17.             {
  18.                 return this.Contract.Code;
  19.             }
  20.         }
  21.  
  22.         public String EP_ContractContractor
  23.         {
  24.             get
  25.             {
  26.                 return this.Contract?.EP_Contractor;
  27.             }
  28.         }
  29.  
  30.         public Guid? EP_ContractorId
  31.         {
  32.             get
  33.             {
  34.                 return this.Contract?.EP_ContractorId;
  35.             }
  36.         }
  37.  
  38.         #endregion Contract
  39.  
  40.         public Decimal? EP_AmountUSD
  41.         {
  42.             get
  43.             {
  44.                 if (this.Amount.HasValue && this.ExchangeRate.HasValue)
  45.                     return this.Amount * this.ExchangeRate;
  46.  
  47.                 return null;
  48.             }
  49.         }
  50.  
  51.         public Decimal? EP_Contract_AmountUSD
  52.         {
  53.             get
  54.             {
  55.                 Decimal? result = null;
  56.                 if (this.Contract != null)
  57.                 {
  58.                     result = this.Contract.EP_AmountUSD;
  59.                 }
  60.  
  61.                 return result;
  62.             }
  63.         }
  64.  
  65.         public Decimal? EP_Contract_Amount
  66.         {
  67.             get
  68.             {
  69.                 Decimal? result = null;
  70.                 if (this.Contract != null)
  71.                 {
  72.                     result = this.Contract.Amount;
  73.                 }
  74.                 return result;
  75.             }
  76.         }
  77.  
  78.         public Decimal? EP_Contract_ExchangeRate
  79.         {
  80.             get
  81.             {
  82.                 Decimal? result = null;
  83.                 if (this.Contract != null)
  84.                 {
  85.                     result = this.Contract.ExchangeRate;
  86.                 }
  87.                 return result;
  88.  
  89.             }
  90.         }
  91.  
  92.         public int? EP_Year
  93.         {
  94.             get
  95.             {
  96.                 if (this.Date.HasValue == false)
  97.                 {
  98.                     return null;
  99.                 }
  100.                 return this.Date.Value.Year;
  101.             }
  102.         }
  103.  
  104.         public String EP_Trimester
  105.         {
  106.             get
  107.             {
  108.                 String result = "";
  109.                 if (this.Date.HasValue == false)
  110.                 {
  111.                     return null;
  112.                 }
  113.  
  114.                 if (this.Date.Value.Month == 1 || this.Date.Value.Month == 2 || this.Date.Value.Month == 3)
  115.                 {
  116.                     result = "T1";
  117.                 }
  118.  
  119.                 if (this.Date.Value.Month == 4 || this.Date.Value.Month == 5 || this.Date.Value.Month == 6)
  120.                 {
  121.                     result = "T2";
  122.                 }
  123.  
  124.                 if (this.Date.Value.Month == 7 || this.Date.Value.Month == 8 || this.Date.Value.Month == 9)
  125.                 {
  126.                     result = "T3";
  127.                 }
  128.  
  129.                 if (this.Date.Value.Month == 110 || this.Date.Value.Month == 11 || this.Date.Value.Month == 12)
  130.                 {
  131.                     result = "T4";
  132.                 }
  133.  
  134.                 return result;
  135.             }
  136.         }
  137.          public decimal? EP_DifferenceUSD
  138.         {
  139.             set
  140.             {
  141.                 EP_DifferenceUSD = 10;
  142.             }
  143.         }
  144.     }
  145. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement