Exemplo n.º 1
0
        private ZCRMPriceBookPricing GetZCRMPriceDetail(JObject priceDetail)
        {
            long id = Convert.ToInt64(priceDetail["id"]);
            ZCRMPriceBookPricing pricing = ZCRMPriceBookPricing.GetInstance(id);

            pricing.Discount  = Convert.ToDouble(priceDetail["discount"]);
            pricing.ToRange   = Convert.ToDouble(priceDetail["to_range"]);
            pricing.FromRange = Convert.ToDouble(priceDetail["from_range"]);

            return(pricing);
        }
Exemplo n.º 2
0
        private JObject GetZCRMPriceDetailAsJSON(ZCRMPriceBookPricing priceDetail)
        {
            JObject priceDetailJSON = new JObject();

            if (priceDetail.Id != null)
            {
                priceDetailJSON.Add("id", priceDetail.Id.ToString());
            }
            priceDetailJSON.Add("discount", priceDetail.Discount);
            priceDetailJSON.Add("to_range", priceDetail.ToRange);
            priceDetailJSON.Add("from_range", priceDetail.FromRange);

            return(priceDetailJSON);
        }
Exemplo n.º 3
0
 /// <summary>
 /// To add price detail of the record based on ZCRMPriceBookPricing class instance.
 /// </summary>
 /// <param name="priceDetail">ZCRMPriceBookPricing class instance</param>
 public void AddPriceDetail(ZCRMPriceBookPricing priceDetail)
 {
     PriceDetails.Add(priceDetail);
 }