如何在我们的项目中将出生日期存储在数据库中(我使用3 dropdownlist) [英] how to store Date of birth in data base (i use 3 dropdownlist )in our project

查看:94
本文介绍了如何在我们的项目中将出生日期存储在数据库中(我使用3 dropdownlist)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请在c#中提供代码

please given code in c#
how to store Date of birth in data base (i''m using 3 dropdownlist )in our project?

推荐答案

连接3个dropdownlist值并转换并存储到数据库中.但更好的是,您可以根据需要使用日期选择器.
Concatenate the 3 dropdownlist values & convert then store to database. But better you may use Date picker for your purpose.


您好,
朋友u可以为此使用日期时间选择器,而不是使用3组合框
您所需要做的就是将数据采集器拖放到ur形式中,并调整其MinDate和MaxDate属性,并确保在存储生日的列中必须有50或50这样的大小. 40的东西.如果您使用3combobox,则必须对leap年进行验证,并检查30和31上的日期,即必须确保用户未输入1988年11月31日作为其出生日期,所有这些都由Framework的DateTime Picker组件处理. .
一旦发现有用,请对我的答案进行评分
谢谢与问候
基:rose:
Hello,
Friend u can use a datetime picker for this purpose rather than using 3 combobox
All u have to do is drag n drop the dattime picker into ur form and adjust its properties called as MinDate and MaxDate and ur done also make sure that in the column in which ur storing the Date of Birth must have a good size like 50 or 40 something. if u use 3combobox u have to give validation for leap years, and check dates on 30 and 31 i.e. u have to make sure that user does not enter 31st November 1988 as its date of birth, All this is handled by DateTime Picker component of Framework.
Do Rate My answer once u find it useful
Thanks & Regards
Radix :rose:


这篇关于如何在我们的项目中将出生日期存储在数据库中(我使用3 dropdownlist)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆