protected void CouponCheck_Click(object sender, EventArgs e) { MessageUserControl.TryRun(() => { RentalController rentalcontroller = new RentalController(); //remove thing rentalcontroller.Cancel_Rental(int.Parse(CouponID.Text)); }, "Rental Canceled", "Cancelled the current rental"); }
protected void CancelButton_Click(object sender, EventArgs e) { int rentalID = int.Parse(RentalID.Text); MessageUserControl.TryRun(() => { RentalController rentalcontroller = new RentalController(); //remove thing rentalcontroller.Cancel_Rental(rentalID); }, "Rental Canceled", "Cancelled the current rental"); //refresh }