ab56a9bcf7
SVN-Revision: r240
119 lines
3.6 KiB
C#
119 lines
3.6 KiB
C#
using DevExpress.XtraGrid.Columns;
|
|
using Lskj.Core;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Lskj.PubUserTomodule
|
|
{
|
|
public partial class operationLog : UserControl
|
|
{
|
|
public operationLog()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// 字体大小
|
|
/// </summary>
|
|
/// <value>The size of the control.</value>
|
|
public string StaffName
|
|
{
|
|
get
|
|
{
|
|
return StaffName;
|
|
}
|
|
set
|
|
{
|
|
StaffName = value;
|
|
if (!string.IsNullOrWhiteSpace(StaffName))
|
|
{
|
|
DataTable dt = SqlHelper.ExecuteDataTable(string.Format("select coid,systemtmp,[type],content,[object],stdt,operator,ws from p_logTab where operator='{0}'", StaffName));
|
|
this.LogsShow.gridControl.DataSource = dt;
|
|
}
|
|
else {
|
|
this.LogsShow.gridControl.DataSource = null;
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
private void Load(object sender, EventArgs e)
|
|
{
|
|
GridColumn coidColumn = new GridColumn();
|
|
coidColumn.Caption = "模块编号";
|
|
coidColumn.FieldName = "coid";
|
|
coidColumn.Visible = true;
|
|
coidColumn.VisibleIndex = 0;
|
|
coidColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn typeColumn = new GridColumn();
|
|
typeColumn.Caption = "操作类型";
|
|
typeColumn.FieldName = "type";
|
|
typeColumn.Visible = true;
|
|
typeColumn.VisibleIndex = 1;
|
|
typeColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn contentColumn = new GridColumn();
|
|
contentColumn.Caption = "内容";
|
|
contentColumn.FieldName = "content";
|
|
contentColumn.Visible = true;
|
|
contentColumn.VisibleIndex = 2;
|
|
contentColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn objectColumn = new GridColumn();
|
|
objectColumn.Caption = "具体内容";
|
|
objectColumn.FieldName = "object";
|
|
objectColumn.Visible = true;
|
|
objectColumn.VisibleIndex = 3;
|
|
objectColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn stdtColumn = new GridColumn();
|
|
stdtColumn.Caption = "时间";
|
|
stdtColumn.FieldName = "stdt";
|
|
stdtColumn.Visible = true;
|
|
stdtColumn.VisibleIndex = 4;
|
|
stdtColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn operatorColumn = new GridColumn();
|
|
operatorColumn.Caption = "操作人员";
|
|
operatorColumn.FieldName = "operator";
|
|
operatorColumn.Visible = true;
|
|
operatorColumn.VisibleIndex = 5;
|
|
operatorColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
GridColumn wsColumn = new GridColumn();
|
|
wsColumn.Caption = "操作电脑名";
|
|
wsColumn.FieldName = "ws";
|
|
wsColumn.Visible = true;
|
|
wsColumn.VisibleIndex = 6;
|
|
wsColumn.OptionsColumn.AllowEdit = false;
|
|
|
|
this.LogsShow.GridView.Columns.AddRange(new GridColumn[] {
|
|
coidColumn,
|
|
typeColumn,
|
|
contentColumn,
|
|
objectColumn,
|
|
stdtColumn,
|
|
operatorColumn,
|
|
wsColumn
|
|
});
|
|
|
|
}
|
|
|
|
|
|
}
|
|
}
|