/// <summary> /// 获取发货通知单 /// </summary> /// <param name="ctx"></param> /// <param name="notices"></param> /// <returns></returns> private List <DeliveryNotice> GetDeliveryNotices(Context ctx, List <DeliveryNotice> notices) { Dictionary <string, Object> dict = ShipWebService.GetLogisticsDetail <Object>(ctx, notices); foreach (var item in dict) { if (item.Key.CompareTo("notices") == 0) { return((List <DeliveryNotice>)item.Value); } } return(null); }
public override void BarItemClick(BarItemClickEventArgs e) { base.BarItemClick(e); switch (e.BarItemKey) { case "tbPlaceOrderFedx": //SaveLogisticsLocus(this.Context); List <DeliveryNotice> notices = GetDeliveryNotices(this.Context); HttpResponseResult result = null; Dictionary <string, Object> dict = ShipWebService.GetLogisticsDetail <Object>(this.Context, notices); foreach (var item in dict) { if (item.Key.CompareTo("notices") == 0) { notices = (List <DeliveryNotice>)item.Value; } if (item.Key.CompareTo("result") == 0) { result = (HttpResponseResult)item.Value; } } SaveLogisticsTrace(this.Context, notices); UpdateShipment(this.Context, notices); //ShowMessage(this.Context, result); DynamicFormShowParameter showParam = new DynamicFormShowParameter(); showParam.CustomParams.Add("trackingNumber", JsonConvert.SerializeObject(GetCarryNos(notices))); showParam.FormId = "HS_SELECTPRINTER"; this.View.ShowForm(showParam); //SaveLogisticsLocus(this.Context,notices); break; } }