Esempio n. 1
0
        private void btnDuyet_Click(object sender, EventArgs e)
        {
            int    tinhTrang = int.Parse(cmbTinhTrang.SelectedValue.ToString());
            string DateFrom  = this.dateFrom.Value.ToString("yyyy/MM/dd HH:mm");
            string DateTo    = this.dateTo.Value.ToString("yyyy/MM/dd HH:mm");

            total = PhieuThueDAO.LaySoLuongPhieuThue(DateFrom, DateTo, tinhTrang);
            dtgDSPhieuThue.DataSource      = PhieuThueDAO.DuyetDSPhieuThue(DateFrom, DateTo, tinhTrang, limit, offset);
            dtgChiTietPhieuThue.DataSource = PhieuThueDAO.LayChiTietPhieuThue(-1);//load lại bảng chi tiết phiếu thuê
        }
Esempio n. 2
0
        private void dtgDSPhieuThue_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridView dgv = sender as DataGridView;

            if (dgv == null)
            {
                return;
            }
            if (dgv.CurrentRow.Selected)
            {
                if (int.TryParse(dgv["maPhieu", e.RowIndex].Value.ToString(), out int idPhieuThue))
                {
                    dtgChiTietPhieuThue.DataSource = PhieuThueDAO.LayChiTietPhieuThue(idPhieuThue);
                }
            }
        }