C Sharp中搜索按钮的编码 [英] Coding of Search Button in C Sharp

查看:76
本文介绍了C Sharp中搜索按钮的编码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要在MS Visual Studio 2010的Windows窗体上对搜索和更新按钮进行编码.
我想从数据库(SQL Server)表中进行搜索,例如,有一个雇员表,并且在雇员表中包含emp_id列,并希望从emp_ip中进行搜索,并且与要更新的情况相同,假设雇员想要更新其个人资料,因此雇员将更改欲望栏,然后单击更新按钮以更新其个人资料....

解决方案

  public  静态 List< string>搜索()
{
    返回 列表< string> {" };
}

公共 静态  void  Update()
{
     for ( int  i =  0 ; i <   int  .MaxValue; i ++)
        ;
}
</ 字符串 >  </ 字符串 >  



认真地说,您期望什么,您对要搜索的数据或要更新的内容一无所知.即使您做了此操作,也无法在这里获得完整的实现(有些站点您可以为此服务付费).
1)点击改善问题".
2)添加有关您希望搜索和更新哪些数据的详细信息.
3)数据如何存储.
4)您已经尝试过的内容以及确切地卡在哪里.


作为您唯一知道该按钮应执行的操作的人,您将必须自己进行编码.

您没有指定编程的平台,但这解释了按钮事件 [ [ 解决方案

public static List<string> Search()
{
    return new List<string> { "Random!!" };
}

public static void Update()
{
    for(int i = 0; i < int.MaxValue; i++)
        ;
}
</string></string>



Seriously, what do you expect, you state nothing about the data you wish to search in or what to update. Even if you did this is not a place where you can come and get a complete implementation (there are sites where you can pay for that service).
1) Click "Improve Question".
2) Add details about what data you wish to search in and update.
3) How it is the data stored.
4) What you''ve already tried and where are you stuck exactly.


As your the only one who knows what the button should do, you will have to do the coding yourself.

You did not specify the platform your programming for, but this explains the
button events[^] in ASP.NET.
This[^] is a more general descriptions of events.


i am using sql 2008 and i want to search from the table having the columns id,name,category if the user enters the string in text box then the search button should reply accordingly searching from the table ...the string may not be the exact as in the table


这篇关于C Sharp中搜索按钮的编码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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