private bool CompleteReelSplit(string trSn, string trSn2, int sendQty, ref int result) { try { CompleteReelSplit cr = new CompleteReelSplit(MyData.GetStationId(), MyData.GetStockNo(), MyData.GetStockNoType(), trSn, trSn2, sendQty); cr.ExecuteQuery(); result = cr.GetResult(); if (result == 0 || result == 1 || result == 2) { return(true); } else if (result == -1) { ShowHint("CompleteReelSplit返回-1, 当前TrSn所在的储位不需要出库, 请联系管理员!", Color.Red); return(false); } else if (result == -2) { ShowHint("CompleteReelSplit返回-2, 发出数量大于等于当前盘物料数量,不满足拆盘条件, 请联系管理员!", Color.Red); return(false); } else { ShowHint("CompleteReelSplit返回" + result + ", 请联系管理员!", Color.Red); return(false); } } catch (Exception ex) { ShowHint("CompleteReelSplit: " + ex.Message, Color.Red); return(false); } }
public static int CompleteReelSplit(int stationId, string stockNo, int stockNoType, string newTrSn, string oldTrSn, int sendQty) { try { CompleteReelSplit rs = new CompleteReelSplit(stationId, stockNo, stockNoType, newTrSn, oldTrSn, sendQty); rs.ExecuteQuery(); return(rs.GetResult()); } catch (Exception ex) { throw ex; } }