Skip to content

Instantly share code, notes, and snippets.

@hasokeric
Last active February 27, 2019 08:25
Show Gist options
  • Save hasokeric/e5e9a27304503afe02311049a3c6e591 to your computer and use it in GitHub Desktop.
Save hasokeric/e5e9a27304503afe02311049a3c6e591 to your computer and use it in GitHub Desktop.
Epicor GetMemo
private string GetMemo(string QuoteNum)
{
//
// Ice.Contracts.Lib.BOReader Must be Added to Assembly
//
Ice.Proxy.Lib.BOReaderImpl bor = WCFServiceSupport.CreateImpl<Ice.Proxy.Lib.BOReaderImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Ice.Contracts.BOReaderSvcContract>.UriPath);
string whereClause = string.Format(" Key1 = '{0}' and RelatedToFile = 'Quote'", QuoteNum);
DataSet dsMemo = bor.GetRows("Ice:BO:Memo", whereClause, string.Empty);
if (dsMemo.Tables[0].Rows.Count > 0)
{
return dsMemo.Tables[0]["MemoText"].ToString(); // or MemoDesc
}
return string.Empty;
}
// Heres another Example
private string GetUserCodeSetting(string CodeTypeID = "IT", string CodeID = "SBWebURL")
{
// Ice.Contracts.Lib.BOReader Must be Added to Assembly
Ice.Proxy.Lib.BOReaderImpl bor = WCFServiceSupport.CreateImpl<Ice.Proxy.Lib.BOReaderImpl>((Ice.Core.Session)oTrans.Session, Epicor.ServiceModel.Channels.ImplBase<Ice.Contracts.BOReaderSvcContract>.UriPath);
string whereClause = string.Format(" UDCodeType.CodeTypeID = '{0}'", CodeTypeID);
DataSet dsUDCodes = bor.GetRows("Ice:BO:UserCodes", whereClause, string.Empty);
if (dsUDCodes.Tables[0].Rows.Count > 0)
{
string subWhereClause = string.Format("CodeID = '{0}'", CodeID);
return dsUDCodes.Tables["UDCodes"].Select(subWhereClause)[0]["LongDesc"].ToString();
}
return string.Empty;
}
@hasokeric
Copy link
Author

Just add Ice.Contracts.Lib.BOReader to your Assembly Ref on UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment