private System.Data.DataTable GetReceivingDetail(string orderNo) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); System.Data.DataTable dt =null; try { List<MESParameterInfo> lstParameters = new List<MESParameterInfo>(); lstParameters.Add(new MESParameterInfo() { ParamName = "custorderno", ParamValue = orderNo, ParamType = "string" }); dt = client.GetReceivingDetailRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()).Tables[0]; } catch (Exception ex) { throw ex; } finally { baseForm.CloseWCF(client); } return dt; }
private bool isExistOrder(string customerid, string custorderno) { wsINP.IwsINPClient client = new wsINP.IwsINPClient(); bool result=false; try { baseForm.SetCursor(); List<MESParameterInfo> lstParameters = new List<MESParameterInfo>(); lstParameters.Add(new MESParameterInfo() { ParamName = "customerid", ParamValue = customerid, ParamType = "string" }); lstParameters.Add(new MESParameterInfo() { ParamName = "custorderno", ParamValue = custorderno, ParamType = "string" }); DataSet ds = client.GetReceivingDetailRecords(baseForm.CurrentContextInfo, lstParameters.ToArray<MESParameterInfo>()); if (ds.Tables[0].Rows.Count > 0) { result = true; } else { result = false; } } catch (Exception ex) { throw ex; } finally { baseForm.ResetCursor(); baseForm.CloseWCF(client); } return result; }