在C#中弹出消息 [英] popup messages in c#

查看:140
本文介绍了在C#中弹出消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个表,其中包含用户ID,名称,登录时间和注销时间以及已归档的状态

因此,当新用户登录(单击登录按钮)后,它将被插入数据库,并且状态字段将被设置为1;当他单击注销按钮时,状态字段将被设置为零.并且,如果例如2002的用户标识已经在数据库中并且尚未登录,那么当他登录时,只有状态字段将从0更改为1.

直到我完成编码和设计


所以我的问题是我想以某种弹出消息(在数据库表中状态为1的用户ID和密码)显示所有登录到系统的用户.

I have created one table which includes user id,name, login time and logout time and status filed

So when a new user logged(clicks on login button) in then it will be inserted into the database and status field will be set to 1 and when he clicks on logout button then status field will be set to zero. And if the user id for example 2002 is already their in the database and not logged in,and when he logged in then only status field will change from 0 to 1.

Till This i have finished with coding and designing


So my Question is i want to display all the users who are logged into the system in some popup message(User Id and password whose status=1 in the database table )

推荐答案

没有理由您无法弹出此窗口,但问题出在哪里?

您的SQL如下所示:
There is no reason you can''t pop this up, but the question is where?

Your SQL will look something like:
select count(u.UserId) from users u where u.Status = 1



...您将执行标量命令.

您可以使用任何方法查看当前计数,例如:


  • 消息框
  • 自定义表单
  • 任务栏图标


  • ...and you''ll be executing a scalar command.

    You can use any method to view the current count, such as:


    • A message box
    • A custom form
    • A task tray icon

    • 这篇关于在C#中弹出消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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