private void VYear_Leave(object sender, EventArgs e) { if (VYear.Text.ToString().Equals("")) { Err.SetError(VYear, "Fill the Year of the movie "); } else { Err.Clear(); try { //dislay the cost of the price of the video after adding the year of the video DateTime dateNow = DateTime.Now; int Currentyear = dateNow.Year; int diffYear = Currentyear - Convert.ToInt32(VYear.Text.ToString()); // MessageBox.Show(diff.ToString()); if (diffYear >= 5) { Vcost.Text = "2"; } if (diffYear >= 0 && diffYear < 5) { Vcost.Text = "5"; } } catch (Exception ex) { } } }
private void CAddress_Leave(object sender, EventArgs e) { if (CAddress.Text.ToString().Equals("")) { Err.SetError(CAddress, "Can't Leave Blank"); } else { Err.Clear(); } }
private void VGenre_Leave(object sender, EventArgs e) { if (VGenre.Text.ToString().Equals("")) { Err.SetError(VGenre, "Fill the details of the movie"); } else { Err.Clear(); } }
private void VCopies_Leave(object sender, EventArgs e) { if (VCopies.Text.ToString().Equals("")) { Err.SetError(VCopies, "Fill the No of copies available in the store "); } else { Err.Clear(); } }
private void VRatting_Leave(object sender, EventArgs e) { if (VRatting.Text.ToString().Equals("")) { Err.SetError(VRatting, "Fill the Ratting of the movie "); } else { Err.Clear(); } }
private void Vtitle_Leave(object sender, EventArgs e) { if (Vtitle.Text.ToString().Equals("")) { Err.SetError(Vtitle, "Fill the title of the movie "); } else { Err.Clear(); } }
private void MoviePK_Leave(object sender, EventArgs e) { if (MoviePK.Text.ToString().Equals("")) { Err.SetError(MoviePK, "fetch the id of the Movie "); } else { Err.Clear(); } }
private void CustomerPK_Leave(object sender, EventArgs e) { if (CustomerPK.Text.ToString().Equals("")) { Err.SetError(CustomerPK, "fetch the id of the Customer "); } else { Err.Clear(); } }