private void btnVReturn_Click(object sender, EventArgs e) { //code to return the video on rent if (!txtVId.Text.ToString().Equals("") && !txtCId.Text.ToString().Equals("") && Rid > 0) { Models.Rental obj = new Models.Rental(); obj.Update(Rid, Convert.ToInt32(txtCId.Text.ToString()), Convert.ToInt32(txtVId.Text.ToString()), dtpIssue.Text.ToString(), dtpReturn.Text.ToString()); txtVName.Text = ""; txtVRatting.Text = ""; txtVYear.Text = ""; txtVCopies.Text = ""; txtVPlot.Text = ""; txtVGenre.Text = ""; txtVId.Text = ""; txtCId.Text = ""; CName.Text = ""; CContact.Text = ""; CPlace.Text = ""; } }
private void BtnRentDelete_Click(object sender, EventArgs e) { //code to delete the rental video record from the details if (Rid > 0) { Models.Rental obj = new Models.Rental(); obj.Delete(Rid); txtVName.Text = ""; txtVRatting.Text = ""; txtVYear.Text = ""; txtVCopies.Text = ""; txtVPlot.Text = ""; txtVGenre.Text = ""; txtVId.Text = ""; txtCId.Text = ""; CName.Text = ""; CContact.Text = ""; CPlace.Text = ""; Rid = 0; } }