![]() |
|
#1
|
||||
|
||||
![]() Здравствуйте!подскажите пож-та что в коде не правильно?
Код:
if ComboBox1.items.Strings[1]='10 дней' then DateTimePicker3.Date:=DateTimePicker3.Date + 10 else if ComboBox1.items.Strings[2]='1 месяц' then DateTimePicker3.Date := EncodeDate(Y , M+1, D-1) else if ComboBox1.items.Strings[3]='2 месяц' then DateTimePicker3.Date := EncodeDate(Y , M+2, D-1) else if ComboBox1.items.Strings[4]='3 месяц' then DateTimePicker3.Date := EncodeDate(Y , M+3, D-1) else if ComboBox1.items.Strings[5]='4 месяц' then DateTimePicker3.Date := EncodeDate(Y , M+4, D-1) else if ComboBox1.items.Strings[6]='5 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+5, D-1) else if ComboBox1.items.Strings[7]='6 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+6, D-1) else if ComboBox1.items.Strings[8]='7 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+7, D-1) else if ComboBox1.items.Strings[9]=8 'месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+8, D-1) else if ComboBox1.items.Strings[10]='9 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+9, D-1) else if ComboBox1.items.Strings[11]='10 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+10, D-1) else if ComboBox1.items.Strings[12]='11 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+11, D-1) else if ComboBox1.items.Strings[13]='12 месяцев' then DateTimePicker3.Date := EncodeDate(Y , M+12, D-1); end; |