📄 childmgrlogin.cs
字号:
// colIsValid
//
this.colIsValid.Caption = "登录成功";
this.colIsValid.FieldName = "IsValid";
this.colIsValid.Name = "colIsValid";
this.colIsValid.Visible = true;
this.colIsValid.VisibleIndex = 4;
this.colIsValid.Width = 90;
//
// colLastActTime
//
this.colLastActTime.Caption = "最后活动时间";
this.colLastActTime.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
this.colLastActTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.colLastActTime.FieldName = "LastActTime";
this.colLastActTime.Name = "colLastActTime";
this.colLastActTime.Width = 124;
//
// colLogoutTime
//
this.colLogoutTime.Caption = "退出时间";
this.colLogoutTime.DisplayFormat.FormatString = "yyyy-MM-dd HH:mm:ss";
this.colLogoutTime.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.colLogoutTime.FieldName = "LogoutTime";
this.colLogoutTime.Name = "colLogoutTime";
this.colLogoutTime.Visible = true;
this.colLogoutTime.VisibleIndex = 5;
this.colLogoutTime.Width = 124;
//
// colDescribe
//
this.colDescribe.Caption = "说明";
this.colDescribe.FieldName = "Describe";
this.colDescribe.Name = "colDescribe";
this.colDescribe.Visible = true;
this.colDescribe.VisibleIndex = 6;
this.colDescribe.Width = 185;
//
// nbbUser
//
this.nbbUser.BtnImgAppend = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgAppend")));
this.nbbUser.BtnImgDelete = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgDelete")));
this.nbbUser.BtnImgEdit = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgEdit")));
this.nbbUser.BtnImgExcel = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgExcel")));
this.nbbUser.BtnImgFind = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgFind")));
this.nbbUser.BtnImgPrint = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgPrint")));
this.nbbUser.BtnImgRefresh = ((System.Drawing.Image)(resources.GetObject("nbbUser.BtnImgRefresh")));
this.nbbUser.ButtonAppend = false;
this.nbbUser.ButtonDelete = false;
this.nbbUser.ButtonEdit = false;
this.nbbUser.GridCtrl = this.gcLogin;
this.nbbUser.Location = new System.Drawing.Point(8, 8);
this.nbbUser.Name = "nbbUser";
this.nbbUser.Size = new System.Drawing.Size(72, 28);
this.nbbUser.TabIndex = 6;
this.nbbUser.ClickButton += new WWAM.BLL.NavBarBtns.ButtonEventHandler(this.nbbUser_ClickButton);
//
// ftxtDate1
//
this.ftxtDate1.EditValue = new System.DateTime(1900, 1, 1, 0, 0, 0, 0);
this.ftxtDate1.EnterMoveNextControl = true;
this.ftxtDate1.Location = new System.Drawing.Point(112, 13);
this.ftxtDate1.Name = "ftxtDate1";
//
// ftxtDate1.Properties
//
this.ftxtDate1.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False;
this.ftxtDate1.Properties.AppearanceFocused.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(224)), ((System.Byte)(192)));
this.ftxtDate1.Properties.AppearanceFocused.Options.UseBackColor = true;
this.ftxtDate1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.ftxtDate1.Properties.DisplayFormat.FormatString = "yyyy 年 MM 月 dd 日";
this.ftxtDate1.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.ftxtDate1.Properties.EditFormat.FormatString = "yyyy 年 MM 月 dd 日";
this.ftxtDate1.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.ftxtDate1.Properties.Mask.EditMask = "yyyy 年 MM 月 dd 日";
this.ftxtDate1.Size = new System.Drawing.Size(144, 21);
this.ftxtDate1.TabIndex = 8;
this.ftxtDate1.EditValueChanged += new System.EventHandler(this.ftxtDate1_EditValueChanged);
//
// ftxtDate2
//
this.ftxtDate2.EditValue = new System.DateTime(1900, 1, 1, 0, 0, 0, 0);
this.ftxtDate2.EnterMoveNextControl = true;
this.ftxtDate2.Location = new System.Drawing.Point(288, 13);
this.ftxtDate2.Name = "ftxtDate2";
//
// ftxtDate2.Properties
//
this.ftxtDate2.Properties.AllowNullInput = DevExpress.Utils.DefaultBoolean.False;
this.ftxtDate2.Properties.AppearanceFocused.BackColor = System.Drawing.Color.FromArgb(((System.Byte)(255)), ((System.Byte)(224)), ((System.Byte)(192)));
this.ftxtDate2.Properties.AppearanceFocused.Options.UseBackColor = true;
this.ftxtDate2.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
this.ftxtDate2.Properties.DisplayFormat.FormatString = "yyyy 年 MM 月 dd 日";
this.ftxtDate2.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.ftxtDate2.Properties.EditFormat.FormatString = "yyyy 年 MM 月 dd 日";
this.ftxtDate2.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.DateTime;
this.ftxtDate2.Properties.Mask.EditMask = "yyyy 年 MM 月 dd 日";
this.ftxtDate2.Size = new System.Drawing.Size(144, 21);
this.ftxtDate2.TabIndex = 9;
this.ftxtDate2.EditValueChanged += new System.EventHandler(this.ftxtDate2_EditValueChanged);
//
// label1
//
this.label1.Location = new System.Drawing.Point(264, 13);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(24, 24);
this.label1.TabIndex = 10;
this.label1.Text = "至";
this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
//
// ChildMgrLogin
//
this.AutoScaleBaseSize = new System.Drawing.Size(6, 14);
this.ClientSize = new System.Drawing.Size(552, 382);
this.Controls.Add(this.gcLogin);
this.Controls.Add(this.label1);
this.Controls.Add(this.ftxtDate2);
this.Controls.Add(this.ftxtDate1);
this.Controls.Add(this.nbbUser);
this.Name = "ChildMgrLogin";
this.Controls.SetChildIndex(this.btnClose, 0);
this.Controls.SetChildIndex(this.nbbUser, 0);
this.Controls.SetChildIndex(this.ftxtDate1, 0);
this.Controls.SetChildIndex(this.ftxtDate2, 0);
this.Controls.SetChildIndex(this.label1, 0);
this.Controls.SetChildIndex(this.gcLogin, 0);
((System.ComponentModel.ISupportInitialize)(this.gcLogin)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.wwamds1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.gvLogin)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ftxtDate1.Properties)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.ftxtDate2.Properties)).EndInit();
this.ResumeLayout(false);
} #endregion #endregion
#region Virtaul Event
protected override void OnFormLoad()
{
this.ftxtDate1.DateTime = DateTime.Today;
this.ftxtDate2.DateTime = DateTime.Today;
this.setLayoutFileName("LoginNote");
this.ViewLoadLayout(this.gvLogin);
}
protected override void OnFormClose()
{
this.ViewSaveLayout(this.gvLogin);
}
protected override void OnFormShow()
{}
protected override void DataRefresh()
{
this.Cursor = Cursors.WaitCursor;
this.gcLogin.DataSource = this.BaseDB.RunCmdGetTable(
string.Format("select * from lLogin where LoginTime >= '{0}' and LoginTime <= '{1}'"
,this.ftxtDate1.DateTime.Date,this.ftxtDate2.DateTime.Date.AddDays(1)),0);
this.Cursor = Cursors.Arrow;
}
#endregion
private void ftxtDate1_EditValueChanged(object sender, System.EventArgs e)
{
DataRefresh();
}
private void ftxtDate2_EditValueChanged(object sender, System.EventArgs e)
{
DataRefresh();
}
private void nbbUser_ClickButton(object sender, WWAM.BLL.NavBarBtns.ButtonEventArgs e)
{
switch((string)e.Button.Tag)
{
case "Refresh":
DataRefresh();
break;
}
}
}}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -