예제 #1
0
        /// <summary>
        ///     Gets the salesorder list.
        /// </summary>
        /// <param name="responce">The responce.</param>
        /// <returns>SalesorderList.</returns>
        /// <exception cref="System.NotImplementedException"></exception>
        internal static SalesorderList getSalesorderList(HttpResponseMessage responce)
        {
            var salesorderList = new SalesorderList();
            var jsonObject     =
                JsonConvert.DeserializeObject <Dictionary <string, object> >(responce.Content.ReadAsStringAsync().Result);

            if (jsonObject.ContainsKey("salesorders"))
            {
                var salesordersArray =
                    JsonConvert.DeserializeObject <List <object> >(jsonObject["salesorders"].ToString());
                foreach (var salesorderObj in salesordersArray)
                {
                    var salesorder = new Salesorder();
                    salesorder = JsonConvert.DeserializeObject <Salesorder>(salesorderObj.ToString());
                    salesorderList.Add(salesorder);
                }
            }
            if (jsonObject.ContainsKey("page_context"))
            {
                var pageContext = new PageContext();
                pageContext = JsonConvert.DeserializeObject <PageContext>(jsonObject["page_context"].ToString());
                salesorderList.page_context = pageContext;
            }
            return(salesorderList);
        }
예제 #2
0
 private void item_PropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     SelectedMainDetails.RemQtyTemp = SelectedMainDetails.RemQty - SalesorderList.Sum(x => x.IntialQty);
     //SelectedMainDetails.RemQtyTemp =  SalesorderList.Sum(x => x.IntialQty);
     if (e != null && e.PropertyName != null)
     {
         RaisePropertyChanged(e.PropertyName);
     }
 }
 /// <summary>
 /// Gets the salesorder list.
 /// </summary>
 /// <param name="responce">The responce.</param>
 /// <returns>SalesorderList.</returns>
 /// <exception cref="System.NotImplementedException"></exception>
 internal static SalesorderList getSalesorderList(HttpResponseMessage responce)
 {
     var salesorderList = new SalesorderList();
     var jsonObject = JsonConvert.DeserializeObject<Dictionary<string, object>>(responce.Content.ReadAsStringAsync().Result);
     if(jsonObject.ContainsKey("salesorders"))
     {
         var salesordersArray = JsonConvert.DeserializeObject<List<object>>(jsonObject["salesorders"].ToString());
         foreach(var salesorderObj in salesordersArray)
         {
             var salesorder = new Salesorder();
             salesorder = JsonConvert.DeserializeObject<Salesorder>(salesorderObj.ToString());
             salesorderList.Add(salesorder);
         }
     }
     if (jsonObject.ContainsKey("page_context"))
     {
         var pageContext = new PageContext();
         pageContext = JsonConvert.DeserializeObject<PageContext>(jsonObject["page_context"].ToString());
         salesorderList.page_context = pageContext;
     }
     return salesorderList;
 }