public static SOFindGoodsDetail Convert(Nodes.DBHelper.Print.SOFindGoodsDetail detail) { Nodes.Outstore.SOFindGoodsDetail copy = null; if (detail != null) { //copy = new Nodes.Outstore.SOFindGoodsDetail(); copy = new Nodes.Outstore.SOFindGoodsDetail() { BillID = detail.BillID, BillNo = detail.BillNo, LoadingSort = detail.LoadingSort, ZhengNum = detail.ZhengNum, SanNum = detail.SanNum, CustomerName = detail.CustomerName, CustomerAddress = detail.CustomerAddress, DelayMark = detail.DelayMark, XiangStr = null, }; //copy.BillID = detail.BillID; //copy.BillNo = detail.BillNo; //copy.LoadingSort = detail.LoadingSort; //copy.ZhengNum = detail.ZhengNum; //copy.SanNum = detail.SanNum; //copy.CustomerName = detail.CustomerName; //copy.CustomerAddress = detail.CustomerAddress; //copy.DelayMark = detail.DelayMark; } return(copy); }
/// <summary> /// 订单落放明细,查找商品明细 /// </summary> /// <returns></returns> public List <Nodes.DBHelper.Print.SOFindGoodsDetail> GetFindGoodsDetail() { List <Nodes.DBHelper.Print.SOFindGoodsDetail> list = new List <Nodes.DBHelper.Print.SOFindGoodsDetail>(); try { #region 请求数据 System.Text.StringBuilder loStr = new System.Text.StringBuilder(); string jsonQuery = WebWork.SendRequest(string.Empty, WebWork.URL_GetFindGoodsDetail, 300000); if (string.IsNullOrEmpty(jsonQuery)) { MsgBox.Warn(WebWork.RESULT_NULL); //LogHelper.InfoLog(WebWork.RESULT_NULL); return(list); } #endregion #region 正常错误处理 JsonGetFindGoodsDetail bill = JsonConvert.DeserializeObject <JsonGetFindGoodsDetail>(jsonQuery); if (bill == null) { MsgBox.Warn(WebWork.JSON_DATA_NULL); return(list); } if (bill.flag != 0) { MsgBox.Warn(bill.error); return(list); } #endregion #region 赋值 foreach (JsonGetFindGoodsDetailResult tm in bill.result) { Nodes.DBHelper.Print.SOFindGoodsDetail sku = new Nodes.DBHelper.Print.SOFindGoodsDetail(); #region 0-7 sku.CustomerAddress = tm.address; sku.BillID = Convert.ToInt32(tm.billId); sku.BillNo = tm.billNo; sku.CustomerName = tm.cName; sku.DelayMark = Convert.ToInt32(tm.delayMark); sku.SanNum = Convert.ToInt32(tm.sanNum); sku.ZhengNum = Convert.ToInt32(tm.zhengNum); #endregion list.Add(sku); } return(list); #endregion } catch (Exception ex) { MsgBox.Err(ex.Message); } return(list); }