WELOA.DAL/WEL/ls_managerlogDAO.cs

(开头部分) 8KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.SqlClient;
using System.Data;
using WELOA.Model;
using System.Configuration;

namespace LSDAL_SQL
{
public class ls_managerlogDAO
{
    
    private DateSetInformation dsinfo = new DateSetInformation();
    private ls_exception exlog = new ls_exception();
    private ls_publicclass publicclassDAO = new ls_publicclass();
    private Polytechnic trinfo = new Polytechnic();

    
    public Polytechnic delmanagerlog(int nid)
    {
        this.trinfo.nException = -1;
        this.trinfo.rowsnum = -1;
        using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["lsstring"].ConnectionString))
        {
            SqlCommand command = connection.CreateCommand();
            command.CommandType = CommandType.Text;
            command.CommandText = "DELETE ls_managerlog WHERE id=@nid";
            command.Parameters.AddWithValue("@nid", nid);
            try
            {
                if (connection.State == ConnectionState.Closed)
                {
                    connection.Open();
                }
                this.trinfo.rowsnum = command.ExecuteNonQuery();
            }
            catch (Exception exception)
            {
                this.exlog.insexception("ls_managersDAO.cs delmanagerlog", exception.Message);
                this.trinfo.nException = 1;
                return this.trinfo;
            }
        }
        return this.trinfo;
    }

    public int insls_managerlog(string loginname, string logintime, string loginip, string loginyanzheng)
    {
        using (SqlConnection connection = new SqlConnection(ConfigurationManager.ConnectionStrings["lsstring"].ConnectionString))
        {
            SqlCommand command = connection.CreateCommand();
            command.CommandText = "insert into ls_managerlog ([登录名],[登录时间],[登录IP],[密码验证]) values (@loginname,@logintime,@loginip,@loginyanzheng)";
            command.CommandType = CommandType.Text;
            command.Parameters.AddWithValue("@loginname", loginname);
            command.Parameters.AddWithValue("@logintime", logintime);
            command.Parameters.AddWithValue("@loginip", loginip);
            command.Parameters.AddWithValue("@loginyanzheng", loginyanzheng);
            try
后面还有 147 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。