public frmBillInf(int id, string sodt, int thang) : this() { dtgvBillP.DataSource = (from e in cal.ListAll() where e.TGBD.Month == thang where e.SoDT == sodt select e).ToList(); textBox3.Text = "50 .000 VNĐ"; var ListBill = from all in cal.ListAll() where all.SoDT == sodt.ToString() where all.TGBD.Month == thang select all; decimal?tinhtongtien() { decimal?sum = 0; foreach (var item in ListBill) { sum += item.ThanhTien; } return(sum); } textBox2.Text = tinhtongtien().ToString() + "VNĐ"; }
public frmHome() { InitializeComponent(); SimDAO d = new SimDAO(); dataGridView1.DataSource = a.ListAll(); fr = this; }