Exemplo n.º 1
0
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="model">系统登陆日志实体</param>
        /// <returns></returns>
        public bool Add(EyouSoft.Model.CompanyStructure.SysLoginLog model)
        {
            DbCommand cmd = this._db.GetSqlStringCommand(SQL_INSERT_SysLoginLog);

            this._db.AddInParameter(cmd, "ID", DbType.String, model.ID);
            this._db.AddInParameter(cmd, "Operator", DbType.Int32, model.Operator);
            this._db.AddInParameter(cmd, "DepatId", DbType.Int32, model.DepatId);
            this._db.AddInParameter(cmd, "CompanyId", DbType.Int32, model.CompanyId);
            this._db.AddInParameter(cmd, "LoginIp", DbType.String, model.LoginIp);

            return(EyouSoft.Toolkit.DAL.DbHelper.ExecuteSql(cmd, this._db) > 0 ? true : false);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取登录日志实体
        /// </summary>
        /// <param name="id">主键编号</param>
        /// <returns>操作日志实体</returns>
        public EyouSoft.Model.CompanyStructure.SysLoginLog GetModel(string id)
        {
            EyouSoft.Model.CompanyStructure.SysLoginLog sysLoginLogModel = null;
            DbCommand cmd = this._db.GetSqlStringCommand(SQL_SELECT_SysLoginLog);

            this._db.AddInParameter(cmd, "ID", DbType.String, id);

            using (IDataReader rdr = EyouSoft.Toolkit.DAL.DbHelper.ExecuteReader(cmd, this._db))
            {
                if (rdr.Read())
                {
                    sysLoginLogModel           = new EyouSoft.Model.CompanyStructure.SysLoginLog();
                    sysLoginLogModel.ID        = rdr.GetString(rdr.GetOrdinal("Id"));
                    sysLoginLogModel.Operator  = rdr.GetInt32(rdr.GetOrdinal("Operator"));
                    sysLoginLogModel.DepatId   = rdr.GetInt32(rdr.GetOrdinal("DepatId"));
                    sysLoginLogModel.CompanyId = rdr.GetInt32(rdr.GetOrdinal("CompanyId"));
                    sysLoginLogModel.LoginTime = rdr.GetDateTime(rdr.GetOrdinal("LoginTime"));
                    sysLoginLogModel.LoginIp   = rdr.GetString(rdr.GetOrdinal("LoginIp"));
                }
            }

            return(sysLoginLogModel);
        }
Exemplo n.º 3
0
 /// <summary>
 /// 添加
 /// </summary>
 /// <param name="model">系统登陆日志实体</param>
 /// <returns></returns>
 public bool Add(EyouSoft.Model.CompanyStructure.SysLoginLog model)
 {
     return(Dal.Add(model));
 }