예제 #1
0
 public void SameAdressHandlerForCost(Cost cost, Quote quote)
 {
     if (!cost.IsSameAddress) return;
     cost.Address = quote.Address;
     cost.Company = quote.Company;
     cost.State = quote.State;
     cost.Postcode = quote.Postcode;
 }
예제 #2
0
        /// <summary>
        /// return total cost base on the cost model
        /// </summary>
        /// <param name="cost"></param>
        /// <returns></returns>
        public virtual Cost GetCost(Cost cost)
        {
            if (cost == null)
                return null;

            LabourEstimator.Total(cost.Labour);
            PriceEstimator.Total(cost);

            return cost;
        }
예제 #3
0
 public IHttpActionResult Create(Cost model)
 {
     var user = User.Identity.GetUserName();
     var cost = _quoteCostService.CreateSystemCost(model, user);
     return Ok(new
     {
         data = cost
     });
 }