📄 log.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using property.model.tb_logInfo;
using property.model.GetConnection;
using System.Data.SqlClient;
using System.Data;
namespace property.control.SystemInfo
{
class log
{
SqlCommand cmd = null;
SqlConnection con = null;
tb_logInfo tblog = new tb_logInfo();
GetConnection getcon = new GetConnection();
#region 添加
public string GetInfoLogAdd(tb_logInfo tblog)
{
string P_str_result = null;
string P_str_insert = "insert into tb_logInfo (username,logdate) values('"+tblog.getusername()+"','"+tblog.getlogdate()+"')";
cmd = new SqlCommand();
con = getcon.GetCon();
cmd.CommandText = P_str_insert;
cmd.Connection = con;
int P_int_add = cmd.ExecuteNonQuery();
if (P_int_add == 1)
{ P_str_result = "ok"; }
else { P_str_result = "no"; }
return P_str_result;
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -