Last active
February 27, 2019 08:25
-
-
Save hasokeric/e5e9a27304503afe02311049a3c6e591 to your computer and use it in GitHub Desktop.
Epicor GetMemo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just add Ice.Contracts.Lib.BOReader to your Assembly Ref on UI