log.cs

来自「财务凭证管理系统,主要是从事公司或部门的财务方面的管理。此系统给会计人员带来很大」· CS 代码 · 共 37 行

CS
37
字号
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 + =
减小字号Ctrl + -
显示快捷键?