Esempio n. 1
0
 public EasyOne.Model.UserManage.UserPointLogInfo GetPointLogById(int logId)
 {
     using (NullableDataReader reader = DBHelper.ExecuteReaderSql("SELECT * FROM PE_PointLog WHERE LogID = @LogID", new Parameters("@LogID", DbType.String, logId)))
     {
         if (reader.Read())
         {
             EasyOne.Model.UserManage.UserPointLogInfo info = UserPointLogInfo(reader);
             info.Memo = reader.GetString("Memo");
             return(info);
         }
         return(new EasyOne.Model.UserManage.UserPointLogInfo(true));
     }
 }
Esempio n. 2
0
 private static EasyOne.Model.UserManage.UserPointLogInfo UserPointLogInfo(NullableDataReader rdr)
 {
     EasyOne.Model.UserManage.UserPointLogInfo info = new EasyOne.Model.UserManage.UserPointLogInfo();
     info.LogId        = rdr.GetInt32("LogID");
     info.UserName     = rdr.GetString("UserName");
     info.ModuleType   = rdr.GetInt32("ModuleType");
     info.InfoId       = rdr.GetInt32("InfoID");
     info.Point        = rdr.GetInt32("Point");
     info.LogTime      = rdr.GetDateTime("LogTime");
     info.Times        = rdr.GetInt32("Times");
     info.IncomePayOut = rdr.GetInt32("IncomePayOut");
     info.Remark       = rdr.GetString("Remark");
     info.IP           = rdr.GetString("IP");
     info.Inputer      = rdr.GetString("Inputer");
     return(info);
 }
Esempio n. 3
0
        public EasyOne.Model.UserManage.UserPointLogInfo GetPointLogByIdAndUserName(int logId, string userName)
        {
            string     strSql    = "SELECT * FROM PE_PointLog WHERE LogID = @LogID AND UserName = @UserName";
            Parameters cmdParams = new Parameters("@LogID", DbType.Int32, logId);

            cmdParams.AddInParameter("@UserName", DbType.String, userName);
            using (NullableDataReader reader = DBHelper.ExecuteReaderSql(strSql, cmdParams))
            {
                if (reader.Read())
                {
                    EasyOne.Model.UserManage.UserPointLogInfo info = UserPointLogInfo(reader);
                    info.Memo = reader.GetString("Memo");
                    return(info);
                }
                return(new EasyOne.Model.UserManage.UserPointLogInfo(true));
            }
        }
Esempio n. 4
0
        private static Parameters GetProcdbComm(EasyOne.Model.UserManage.UserPointLogInfo userPointLogInfo)
        {
            Parameters parameters = new Parameters();

            parameters.AddInParameter("@LogID", DbType.Int32, userPointLogInfo.LogId);
            parameters.AddInParameter("@UserName", DbType.String, userPointLogInfo.UserName);
            parameters.AddInParameter("@ModuleType", DbType.Int32, userPointLogInfo.ModuleType);
            parameters.AddInParameter("@InfoID", DbType.Int32, userPointLogInfo.InfoId);
            parameters.AddInParameter("@Point", DbType.Int32, userPointLogInfo.Point);
            parameters.AddInParameter("@LogTime", DbType.DateTime, userPointLogInfo.LogTime);
            parameters.AddInParameter("@Times", DbType.Int32, userPointLogInfo.Times);
            parameters.AddInParameter("@IncomePayOut", DbType.Int32, userPointLogInfo.IncomePayOut);
            parameters.AddInParameter("@Remark", DbType.String, userPointLogInfo.Remark);
            parameters.AddInParameter("@IP", DbType.String, userPointLogInfo.IP);
            parameters.AddInParameter("@Inputer", DbType.String, userPointLogInfo.Inputer);
            parameters.AddInParameter("@Memo", DbType.String, userPointLogInfo.Memo);
            return(parameters);
        }
Esempio n. 5
0
 public bool Add(EasyOne.Model.UserManage.UserPointLogInfo userPointLogInfo)
 {
     return(DBHelper.ExecuteProc("PR_UserManage_UserPointLog_Add", GetProcdbComm(userPointLogInfo)));
 }