Date Validations.. VB.NET Winforms

Discussion in 'ASP.NET / ASP.NET Core' started by burledivya, Jan 28, 2010.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Hi Friends Hope You all would help me,



    I have two calender controls and button control ( when clicking the button user see a list of events between the date range.

    1. Start Date 2. End date 3. search button

    My bussiness gave me some set of rules through which user will be validated.

    I have done very few lines of code and wrote some clue in comments.


    1.FIRST VALIDATE THE USER ENTERED DATE FORMAT AND IF ITS INVALID THEN THROW ERROR. HERE NULL DATES ARE VALID


    2. 'START DATE MUST BE LESS THAN AND EQUAL TO END DATE

    If mSTdate <= mENdate Then
    MessageBox.Show("Gets Data")
    else MessageBox.Show(" throw error")
    End If

    3. 'BOTH START DATE and END DATE ARE blank ( set them to min value and current date)

    If mSTmdate = Nothing And mENDdate = Nothing Then
    MessageBox.Show("IT GETS DATA ")
    else MessageBox.Show(" throw error")

    End If

    4. 'START DATE NOT BLANK AND LESSER THAN CURRENT DATE AND END DATE BLANK (set END date to current date)
    'If mSTmdate Nothing And mENDdate = Nothing Then

    'End If

    5. 'STRAT DATE BLANK(set to min value) and END date not blank

    '

    '}

    THANKS FOR READING WITH PATIENCE

    DIVYA.....
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page