2 Star 5 Fork 0

卢华明/Nikita.Assist.Logger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
FrmLoggerInfo.cs 1.74 KB
一键复制 编辑 原始数据 按行查看 历史
lhmlyx2723356 提交于 2015-08-30 10:38 . shangchuan
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 Nikita.Assist.Logger
{
public partial class FrmLoggerInfo : Form
{
public FrmLoggerInfo()
{
InitializeComponent();
}
LoggerHelper helper = new LoggerHelper();
private void grdLog_CellClick(object sender, DataGridViewCellEventArgs e)
{
if (this.grdLog.CurrentRow == null)
{
return;
}
txtLogInfo.Text = this.grdLog.CurrentRow.Cells["Column4"].Value.ToString();
}
private void btnSearch_Click(object sender, EventArgs e)
{
string strWhere = " Date between '" + dateTimePicker1.Value.Date.ToString("yyyy-MM-dd") + "' and '" + dateTimePicker2.Value.Date.ToString("yyyy-MM-dd") + "' order by id desc ";
DoQuery(strWhere);
}
private void 初始化日志ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmLoggerInit frmInit = new FrmLoggerInit();
if (frmInit.ShowDialog() == DialogResult.OK)
{
MessageBox.Show("初始化成功");
}
}
private void FrmLogger_Load(object sender, EventArgs e)
{
this.grdLog.AutoGenerateColumns = false;
dateTimePicker2.Value = dateTimePicker2.Value.AddDays(1);
}
private void DoQuery(string strWhere)
{
DataSet ds = LoggerHelper.GetLogInfo(strWhere);
if (ds != null && ds.Tables.Count > 0)
{
grdLog.DataSource = ds.Tables[0];
}
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/lhmlyx2723356/Nikita.Assist.Logger.git
git@gitee.com:lhmlyx2723356/Nikita.Assist.Logger.git
lhmlyx2723356
Nikita.Assist.Logger
Nikita.Assist.Logger
master

搜索帮助