You have to run a bit of code to get to it but here is what I use:
string sConnEpicor = “Data Source=xxxxx;Initial Catalog=xxxxx; User Id=xxxxx;Password=xxxxx; Trusted_Connection=false;”;
string sXML = “”; string sLine = “”; string sPage = “”;
using (System.Data.SqlClient.SqlConnection MyCon = new System.Data.SqlClient.SqlConnection(sConnEpicor))
{
MyCon.Open();
System.Data.SqlClient.SqlCommand oCmd = new System.Data.SqlClient.SqlCommand();
oCmd.Connection = MyCon;
oCmd.CommandText = “select pvs.PageSeq,qd.QuoteNum,qd.QuoteLine,pvs.FieldValues from Epicor10.erp.QuoteDtl qd left join Epicor10.erp.PcValueSet pvs on pvs.GroupSeq = qd.GroupSeq where quotenum = @QuoteNum
and qd.PartNum = ‘Quotable Part’ order by qd.QuoteLine, pvs.PageSeq”;
oCmd.Parameters.AddWithValue(“@QuoteNum”, Inputs.copyQuote.Value);
System.Data.SqlClient.SqlDataReader oReader = oCmd.ExecuteReader();
if (oReader.HasRows)
{
while (oReader.Read())
{
try
{
sXML = oReader[“FieldValues”].ToString();
sLine = oReader[“QuoteLine”].ToString();
sPage = oReader[“PageSeq”].ToString();
System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
xmlDoc.LoadXml(sXML);
if (sLine == Inputs.copyLine.Value.ToString())
{
if (sPage == “1”)
{
System.Xml.XmlNodeList HPartDesc = xmlDoc.GetElementsByTagName(“HPartDesc”);
Inputs.HPartDesc.Value = HPartDesc[0].InnerText;
System.Xml.XmlNodeList HToolNum = xmlDoc.GetElementsByTagName(“HToolNum”);
Inputs.HToolNum.Value = HToolNum[0].InnerText;
}
catch (Exception e)
{
Inputs.msgForBrenten.Value = e.ToString();
}
} /* oreader */
}
oReader.Close();
MyCon.Close();
}
}
Brenda J. Mohr
Humtown Products
visit us at:
www.humtown.com
