5
uzyskać błędach niedozwolone znaki w ścieżce z tej linii koduXDocument.Load "Nielegalne postacie na ścieżce". Błąd, ale kiedy przetestować funkcję jest XML
var doc = XDocument.Load(openBatch.GetOpenBatchSummary("xxxx", "xxxx", "xxxx", "", "", ""));
var summary = from r in doc.Descendants("OpenBatchSummary")
select new
{
PaymentTypeID = r.Element("Payment_Type_ID"),
Return = r.Element("Return"),
Sale = r.Element("Sale"),
};
foreach (var i in summary)
{
ListViewItem it = new ListViewItem(i.PaymentTypeID.ToString());
it.SubItems.Add(i.Sale.ToString());
it.SubItems.Add(i.Return.ToString());
listView1.Items.Add(it);
}
Ale kiedy przetestować za pośrednictwem tej linii kodu jest dane XML
var test = openBatch.GetOpenBatchSummary("xxx", "xxxx", "xxx", "", "", "");
MessageBox.Show(test);
I tu jest wyjście:
możesz mi pomóc? PROSZĘ istnieje inny błąd "ListViewItem it = new ListViewItem (i.PaymentTypeID.ToString());" DZIĘKI :) – GrayFullBuster
@GrayFullBuster Spróbuj zmienić to na: 'ListViewItem it = new ListViewItem {Content = i.PaymentTypeID.ToString()};' – Mir
dzięki, mam po prostu złą wartość dla potomków, moja wartość ma "<>> "to, jak mogę to usunąć? – GrayFullBuster