wpf c#输入验证并将数据保存到数据库 [英] wpf c# input validation and saving the data to database

查看:115
本文介绍了wpf c#输入验证并将数据保存到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我更喜欢wpf c#concepts.in我的工作我想创建一个wpf UI表单,其中包括一些员工注册数据(如姓名,年龄,名称,部门,年龄,薪水)。我想保存这些值sql datbase.before添加输入应该被验证,就像名称只包含字母表和age字段只包含数值。在最后我想显示content.can我通过使用模型视图或mvvm概念实现这一点??

i am fresher to wpf c# concepts.in my work i want create a wpf UI form which includes some datas for employee registration like(name,age,designation,department,age,salary).i want to save these values in the sql datbase.before adding the input should be validated like the name filed only contains alphabets and age field only contains numerical value.and at final i want display the content.can i implement this by using model view or mvvm concept??

推荐答案

如果你谷歌,你会得到一堆这类要求的样本。



验证用户输入 - WPF MVVM [ ^ ]

http://stackoverflow.com/questions/4884595/wpf-mvvm-error-vali日期 [ ^ ]

http://asimsajjad.blogspot.in/2010 /08/input-validation-using-mvvm-pattern.html [ ^ ]
If you google you will get a bunch of samples for this type of requirement.

Validating User Input - WPF MVVM[^]
http://stackoverflow.com/questions/4884595/wpf-mvvm-error-validation[^]
http://asimsajjad.blogspot.in/2010/08/input-validation-using-mvvm-pattern.html[^]


这篇关于wpf c#输入验证并将数据保存到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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