Ejemplo n.º 1
0
        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)
                {
                }
            }
        }
Ejemplo n.º 2
0
 private void CAddress_Leave(object sender, EventArgs e)
 {
     if (CAddress.Text.ToString().Equals(""))
     {
         Err.SetError(CAddress, "Can't Leave Blank");
     }
     else
     {
         Err.Clear();
     }
 }
Ejemplo n.º 3
0
 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();
     }
 }
Ejemplo n.º 4
0
 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();
     }
 }
Ejemplo n.º 5
0
 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();
     }
 }
Ejemplo n.º 6
0
 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();
     }
 }
Ejemplo n.º 7
0
 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();
     }
 }
Ejemplo n.º 8
0
 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();
     }
 }