public ThongKe(DangNhap dn, string manv) { InitializeComponent(); this.dn = dn; this.manv = manv; hd = new HoaDonController(); dv = new DichVuController(); cbxtknamNam.SelectedIndex = 0; cbxtkquyNam.SelectedIndex = 0; cbxtkquyQuy.SelectedIndex = 0; cbxtkthangNam.SelectedIndex = 0; cbxtkthangThang.SelectedIndex = 0; int thang = int.Parse(cbxtkthangThang.SelectedItem.ToString()); int nam = int.Parse(cbxtkthangNam.SelectedItem.ToString()); lblChiThu.Text = "Tổng chi thu tháng: "; lblTongChiThu.Text = null; lblTongTienDichVu.Text = null; lblTongThuTienPhong.Text = null; tblThongKe.DataSource = hd.thongKeThang(thang, nam); pnlThang.Show(); pnlNam.Hide(); pnlQuy.Hide(); }
private void chonThongKeThang(object sender, EventArgs e) { if (rdThang.Checked) { pnlNam.Hide(); pnlQuy.Hide(); pnlThang.Show(); cbxtknamNam.SelectedIndex = 0; cbxtkquyNam.SelectedIndex = 0; cbxtkquyQuy.SelectedIndex = 0; cbxtkthangNam.SelectedIndex = 0; cbxtkthangThang.SelectedIndex = 0; int thang = int.Parse(cbxtkthangThang.SelectedItem.ToString()); int nam = int.Parse(cbxtkthangNam.SelectedItem.ToString()); tblThongKe.DataSource = hd.thongKeThang(thang, nam); lblChiThu.Text = "Tổng chi thu tháng: "; lblTongChiThu.Text = null; lblTongTienDichVu.Text = null; lblTongThuTienPhong.Text = null; } }