zoukankan
html css js c++ java
login
namespace
PMSmanage
{
public
partial
class
FrmLog : DevComponents.DotNetBar.Office2007Form
{
public
FrmLog()
{
InitializeComponent();
}
private
void
Form1_Load(
object
sender, EventArgs e)
{
GetTree();
}
private
void
GetTree()
{
DataSet ds
=
new
DataSet();
DataSet dschild
=
new
DataSet();
string
parent
=
TBaseOper.WebServer.GetGroupParent();
string
err
=
null
;
TBaseOper.WebServer.GetGroup_info(
ref
ds,
ref
err);
treeView1.BeginUpdate();
treeView1.Nodes.Add(parent);
treeView1.Nodes[
0
].Tag
=
"
组
"
;
for
(
int
i
=
0
; i
<
ds.Tables[
0
].Rows.Count; i
++
)
{
string
userGroup
=
""
, child2
=
""
;
treeView1.Nodes[
0
].Nodes.Add(ds.Tables[
0
].Rows[i][
0
].ToString());
treeView1.Nodes[
0
].Nodes[i].Tag
=
"
组
"
;
userGroup
=
ds.Tables[
0
].Rows[i][
1
].ToString();
TBaseOper.WebServer.GetUserName_bygroupId(userGroup,
ref
dschild,
ref
err);
for
(
int
j
=
0
;j
<
dschild.Tables[
0
].Rows.Count; j
++
)
{
child2
=
dschild.Tables[
0
].Rows[j][
0
].ToString();
treeView1.Nodes[
0
].Nodes[i].Nodes.Add(child2);
treeView1.Nodes[
0
].Nodes[i].Nodes[j].Tag
=
dschild.Tables[
0
].Rows[j][
1
].ToString();
}
dschild.Clear();
}
treeView1.EndUpdate();
}
private
void
buttonX1_Click(
object
sender, EventArgs e)
{
this
.Close();
}
private
void
treeView1_NodeMouseClick(
object
sender, TreeNodeMouseClickEventArgs e)
{
string
errMsg
=
null
;
DataSet ds
=
new
DataSet();
ds.Clear();
if
(e.Node.Tag.ToString()
!=
"
组
"
)
{
string
userID
=
e.Node.Tag.ToString();
string
BeginTime
=
dtp_Btime.Text;
string
EndTime
=
dtp_Etime.Text;
if
(
!
TBaseOper.WebServer.GetLoginRecord(BeginTime, EndTime, userID,
ref
ds,
ref
errMsg))
{
MessageBoxEx.Show(errMsg);
return
;
}
//
dgv_LoginLog.Rows.Clear();
if
(ds.Tables[
0
].Rows.Count
==
0
)
{
MessageBoxEx.Show(
"
没有该用户的登陆记录!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
dgv_LoginLog.DataSource
=
ds.Tables[
0
];
}
}
private
void
dgv_LoginLog_CellClick(
object
sender, DataGridViewCellEventArgs e)
{
DataSet ds
=
new
DataSet ();
string
err
=
""
;
if
(dgv_LoginLog.RowCount
==
1
)
return
;
string
loginID
=
dgv_LoginLog[
6
, dgv_LoginLog.CurrentRow.Index].Value.ToString();
if
(loginID
==
""
)
{
MessageBoxEx.Show(
"
请选择登陆记录!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
if
(
!
TBaseOper.WebServer.GetOperRecord (loginID ,
ref
ds,
ref
err))
{
MessageBoxEx.Show(err);
}
if
(ds.Tables[
0
].Rows.Count
==
0
)
{
MessageBoxEx.Show(
"
没有该用户的操作记录!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
dgv_UserLog.DataSource
=
ds.Tables[
0
];
}
private
void
btn_search_Click(
object
sender, EventArgs e)
{
string
memo
=
txt_memo.Text;
if
(memo
==
""
)
{
MessageBoxEx.Show(
"
请输入查询描述!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
DataSet ds
=
new
DataSet();
string
err
=
""
;
if
(dgv_LoginLog.RowCount
==
1
)
return
;
string
loginID
=
dgv_LoginLog[
0
, dgv_LoginLog.CurrentRow.Index].Value.ToString();
if
(loginID
==
""
)
{
MessageBoxEx.Show(
"
请选择登陆记录!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
if
(
!
TBaseOper.WebServer.GetOperRecordByOper (loginID ,memo ,
ref
ds,
ref
err))
{
MessageBoxEx.Show(err);
}
if
(ds.Tables[
0
].Rows.Count
==
0
)
{
MessageBoxEx.Show(
"
没有该用户的操作记录!
"
,
"
提示
"
, MessageBoxButtons.OK, MessageBoxIcon.Information);
return
;
}
dgv_UserLog.DataSource
=
ds.Tables[
0
];
}
}
}
分享到:
更多
查看全文
相关阅读:
gcc编译代码报错及编译方式
YUV到RGB的转换
YUV和RGB格式分析
v4l2的学习建议和流程解析
在Ubuntu下安装imx6linux系统的交叉编译环境遇到的问题总结
《赢在测试2》--读书笔记
关于javascript的slice方法
数字的千分位格式化方法
javascript开发中的封装模式(转)
防止表单重复提交的几种方法
原文地址:https://www.cnblogs.com/tiasys/p/1018169.html
最新文章
MySQL创建用户与授权
查看MySQL实例的当前连接数
jstack分析线程
linux系统下性能分析常用命令
nmon监控结果分析文件中网络分析NET(网络带宽占用情况)
Nginx常用功能与解析nginx配置文件结构
python中的Queue
VS2012编译VS2010版本的过程报错解决
2016-08-31
python实践3:cursor() — 数据库连接操作
热门文章
linux里的进程简介
20个C语言中常用宏定义总结
2016-08-30
详解在bash脚本中如何获取自身路径
2016-08-29
工作查资料笔记
Segmentation Fault错误原因总结
Java异常处理机制
【转载】String、StringBuffer与StringBuilder之间区别
纪念汪国真--那些曾经伴我度过岁月的诗
Copyright © 2011-2022 走看看