private void ResetListRental() { //_listRental = _feature.GetAllRental(); //grdRental.DataSource = _listRental; var rentalDto = new SearchRentalDTO(); rentalDto.Status = (int) RentalStatus.NEW; rentalDto.FromDate = dteRentalFrom.Text; rentalDto.ToDate = dteRentalTo.Text; rentalDto.PageNumber = 1; var rentalBus = new SearchRentalBUS(); grdRental.DataSource = rentalBus.SearchRentals(rentalDto); }
private void BtnRentalSearchClick(object sender, EventArgs e) { SearchRentalDTO rentalDto = new SearchRentalDTO(); rentalDto.Title = txtRentalTitle.Text; rentalDto.UserName = txtRentalUser.Text; rentalDto.Status = cboRentalStatus.SelectedIndex; rentalDto.FromDate = dteRentalFrom.Text; rentalDto.ToDate = dteRentalTo.Text; rentalDto.PageNumber = 1; SearchRentalBUS rentalBus = new SearchRentalBUS(); grdRental.DataSource = rentalBus.SearchRentals(rentalDto); }