예제 #1
0
        public TariffRateContent Post(StandardRateMain standardRateMain)
        {
            if (standardRateMain == null || !ModelState.IsValid)
            {
                throw new HttpException((int)HttpStatusCode.BadRequest, "Invalid Request");
            }
            TariffRateContent tariffRateContent = tariffRateService.SaveTariffRate(standardRateMain.CreateFrom()).CreateFrom();

            return(tariffRateContent);
        }
예제 #2
0
 /// <summary>
 ///  Create web model from entity For List
 /// </summary>
 public static ApiModels.TariffRateContent CreateFrom(this TariffRateContent source)
 {
     return(new ApiModels.TariffRateContent
     {
         StandardRtMainId = source.StandardRtMainId,
         StandardRtMainCode = source.StandardRtMainCode,
         StandardRtMainName = source.StandardRtMainName,
         StartDt = source.StartDt,
         EndDt = source.EndDt,
         TariffTypeCodeName = source.TariffTypeCodeName,
         StandardRtMainDescription = source.StandardRtMainDescription,
         OperationId = source.OperationId,
         TariffTypeId = source.TariffTypeId,
         OperationCodeName = source.OperationCodeName,
     });
 }