コード例 #1
0
 public static Utility GetUtilityWithIdAndResourceName(UTILITY utility)
 {
     return(new Utility
     {
         Id = utility.ID,
         ResourceName = UtilityModel.GetResourceNameForUtility(utility.NAME)
     });
 }
コード例 #2
0
 public static Utility GetUtilityWithOutBigUsagePrice(UTILITY utility)
 {
     return(new Utility
     {
         Id = utility.ID,
         ResourceName = UtilityModel.GetResourceNameForUtility(utility.NAME),
         Name = utility.NAME,
         Price = utility.PRICE,
         ImagePath = HelperMethod.GetUtilityImage(utility.ID),
         Unit = Unit.Get(utility.UNIT)
     });
 }
コード例 #3
0
 public static Utility GetUtilityWithBigUsagePrice(UTILITY utility)
 {
     return(new Utility
     {
         Id = utility.ID,
         ResourceName = UtilityModel.GetResourceNameForUtility(utility.NAME),
         Name = utility.NAME,
         Price = utility.PRICE,
         BigUsagePrice = (decimal)utility.BIGUSAGEPRICE,
         UsageForStandartPrice = Math.Round((decimal)utility.USAGEFORSTANDARTPRICE, 0),
         ImagePath = HelperMethod.GetUtilityImage(utility.ID),
         Unit = Unit.Get(utility.UNIT)
     });
 }