/// <summary> /// 获取订单头和明细 爱库存 /// </summary> /// <param name="OrderNumber"></param> /// <param name="BatchNumber"></param> /// <param name="QueryType"></param> /// <returns></returns> public OrderAndDetailModel RFGetOrderAndDetail_AKC(string PrintKey) { OrderAndDetailModel model = new OrderAndDetailModel(); using (SqlConnection conn = new SqlConnection(BaseAccessor._dataBase.ConnectionString)) { SqlCommand cmd = new SqlCommand("Proc_WMS_RFGetOrderAndDetail_AKC", conn); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.AddWithValue("@PrintKey", PrintKey); cmd.Parameters[0].SqlDbType = SqlDbType.NVarChar; cmd.CommandTimeout = 300; conn.Open(); DataSet ds = new DataSet(); SqlDataAdapter sda = new SqlDataAdapter(); sda.SelectCommand = cmd; sda.Fill(ds); conn.Close(); if (ds.Tables.Count > 0) { model.orderInfos = ds.Tables[0].ConvertToEntityCollection <OrderInfo>(); model.orderDetailInfos = ds.Tables[1].ConvertToEntityCollection <OrderDetailInfo>(); return(model); } else { return(null); } } }
/// <summary> /// 根据波次号获取订单头和明细RF枪 爱库存 /// </summary> /// <param name="OrderNumber"></param> /// <param name="BatchNumber"></param> /// <param name="QueryType"></param> /// <param name="msg"></param> /// <returns></returns> public OrderAndDetailModel RFGetOrderAndDetail_AKC(string PrintKey, out string msg) { msg = string.Empty; try { OrderAndDetailModel model = new OrderAndDetailModel(); model = new OrderManagementAccessor().RFGetOrderAndDetail_AKC(PrintKey); msg = "200"; return(model); } catch (Exception ex) { msg = ex.Message.ToString(); return(null); } }