コード例 #1
0
 /// <summary>
 /// Convert a given voteQuestion to a ViewModel
 /// </summary>
 public static ViewModels.SepDrinksSalesForecast ToViewModel(this MicrosoftDynamicsCRMadoxioSepdrinksalesforecast forecast)
 {
     ViewModels.SepDrinksSalesForecast result = null;
     if (forecast != null)
     {
         result = new ViewModels.SepDrinksSalesForecast()
         {
             Id = forecast.AdoxioSepdrinksalesforecastid,
             EstimatedRevenue  = forecast.AdoxioEstimatedrevenue,
             IsCharging        = forecast.AdoxioIscharging,
             Name              = forecast.AdoxioName,
             EstimatedServings = forecast.AdoxioEstimatedservings,
             PricePerServing   = forecast.AdoxioPriceperserving,
             EstimatedCost     = forecast.AdoxioEstimatedcost,
             DrinkTypeId       = forecast._adoxioTypeValue
         };
     }
     return(result);
 }
コード例 #2
0
 public static void CopyValues(this MicrosoftDynamicsCRMadoxioSepdrinksalesforecast to, ViewModels.SepDrinksSalesForecast from)
 {
     to.AdoxioEstimatedrevenue  = from.EstimatedRevenue;
     to.AdoxioIscharging        = from.IsCharging;
     to.AdoxioName              = StringUtility.Truncate(from.Name, 100);
     to.AdoxioEstimatedservings = from.EstimatedServings;
     to.AdoxioPriceperserving   = from.PricePerServing;
     to.AdoxioEstimatedcost     = from.EstimatedCost;
 }