使用所有验证以窗口形式添加,保存,编辑,删除代码 [英] add ,save ,edit,delete code in window form with all validation
问题描述
我想设计一个窗口,其中包含clientid(自动递增),名称,地址,年龄(仅数字),emailid,电话号码,格式为(+ 91-9822-22-22-22).我还需要4个按钮才能添加,保存,编辑和删除.
我知道如何在asp.net中编写此代码.我已经在Windows窗体中编写了此代码.但是我的问题是我将如何编写代码以验证窗口中的电话号码格式.我需要一个链接,该链接将以Windows形式添加,保存,编辑和删除代码.您可以使用带遮罩的文本框.
您可以在此链接中找到详细信息;
蒙版文本框 [ http://www.connectionstrings.com/ [ ^ ]
这是LINQ中的插入更新删除函数的示例(需要一些经验,并假设您将使用sql,因为您未指定它),
http://www.dotnettutorials.com/tutorials/database/linq-to-sql-add-edit-delete-cs.aspx [ http://www.developerfusion.com/code/4445/userfriendly-validation-using-errorprovider / [^ ]
Hi,
I want to design a window which has clientid (autoincrement), name, address, age(only number), emailid, telephone number in format as(+91-9822-22-22-22). I also need 4 buttons in order to add, save, edit and delete.
I know how to write this code in asp.net. I have written this code in windows forms. But my problem is how i will write code to validate that telephone number format in window. I need a link which will have add, save, edit, and delete code in windows form.
For telephone format; you can use a masked text box.
You can find details for that in this link;
Masked Text Box[^]
I am assuming you will be using a database for saving the data. In order to do that you need to connect to database and for each button you need to write a query for each button.
For db connection use;
http://www.connectionstrings.com/[^]
This is an example of insert update delete func in LINQ(needs a bit experience and assuming you are going to use sql since you dont specify it),
http://www.dotnettutorials.com/tutorials/database/linq-to-sql-add-edit-delete-cs.aspx[^]
If I were you I should give a look at CRUD operations at first.
For validation i think you will be using textboxes for these inputs;
You can use;
http://www.developerfusion.com/code/4445/userfriendly-validation-using-errorprovider/[^]
这篇关于使用所有验证以窗口形式添加,保存,编辑,删除代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!