I have written a WPF program with c# that uses a SQL server database here are my tables
the goal when the user checks the radiobutton, a listview named lv_factors shows the sell factors that are sold by check. here is the code:
private void rb_sell_Checked(object sender, RoutedEventArgs e)
{
var db = new mydataDataContext();
var all = from p in db.tb_sellFacts
from r in db.tb_Clients
from s in db.tb_sellChecks
from t in db.tb_banks
from q in db.tb_checkStatus
where p.id_sellFact == s.id_sellfact &&
r.id == p.id_customer &&
t.id == s.id_bank &&
q.id == s.passed
select new dataTypes.AllChecks
{
bankname = t.name.ToString(),
id = p.id_sellFact.ToString(),
buydate = p.buydate,
checkaccount = s.checkaccount,
checkfee = s.paidprice.ToString(),
checknumber = s.checknumber,
checkstate = q.status,
custId = p.id_customer.ToString(),
idbank = s.id_bank.ToString(),
insertdate = p.insertdate,
passed = q.id.ToString(),
checkDate = s.checkdate,
CustName = r.family
};
lv_factors.ItemsSource = all;
}
but the listview doesn't show anything.can anyone help me?