0

Hi everybody i am new to vb.net programing and i am developing gym application and i need help in coding
in a form i an giving the joining date of a customer and with membership duration and
the thing i need is if select 30days membership then expiry date to be generated from joining date with type of membership (i.e month,quartly,half-yearly,yearly) like that
can anyone help plzzzzzz

Thanks is advance

5
Contributors
6
Replies
7
Views
6 Years
Discussion Span
Last Post by Mike Askew
0

i need is if select 30days membership then expiry date to be generated from joining date with type of membership (i.e month,quartly,half-yearly,yearly)

Can you please say some more about this type of membership(month, quarty, half-yearly, yearly)? What are they suppose to meanm I mean what is their purpose in here?

0

There should be 2 fields in the database.

1) Date_of_join
2) Date_of_Expiry

1 Combobox for time period
2 Datetimepickers
First one for date of joining you will select
Second for date of expiry (readonly) autogenrated.

Suppose Combobox value is 30 Days

do the following on the value change event of the datetimepicker 1

datetimepicker2.value=DateTimePicker1.Value.AddDays(comboBox1.SelectedValue)

Insert into the database

Next time check

if datetime.now > Date_of_Expiry
Subscription Expired
Exit sub


I hope you get the logic.

0

datetimepicker2.value=DateTimePicker1.Value.AddDays(comboBox1.SelectedValue)

I believe the .SelectedValue would need to be converted from string to int first for that line to work?

0

Hi Mikey,

I think you answer doesn't going to have any effect because this thread is 1 year old.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.