Exemplo n.º 1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sql"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        private List <FeedbackInfo> GetFeedBackList(string sql, params IDataParameter[] parameters)
        {
            using (var reader = ConfigManger.Provider.ExecuteReader(CommandType.Text, sql, parameters))
            {
                List <FeedbackInfo> olist = new List <FeedbackInfo>();
                while (reader.Read())
                {
                    FeedbackInfo gMFeedBackInfo = new FeedbackInfo();
                    gMFeedBackInfo.Uid          = MathUtils.ToInt(reader["UId"]);
                    gMFeedBackInfo.GameID       = MathUtils.ToInt(reader["GameID"]);
                    gMFeedBackInfo.ServerID     = MathUtils.ToInt(reader["ServerID"]);
                    gMFeedBackInfo.Pid          = MathUtils.ToNotNullString(reader["Pid"]);
                    gMFeedBackInfo.NickName     = MathUtils.ToNotNullString(reader["NickName"]);
                    gMFeedBackInfo.Content      = MathUtils.ToNotNullString(reader["content"]);
                    gMFeedBackInfo.ID           = MathUtils.ToInt(reader["GMID"]);
                    gMFeedBackInfo.Type         = MathUtils.ToInt(reader["GMType"]);
                    gMFeedBackInfo.ReplyContent = MathUtils.ToNotNullString(reader["RContent"]);
                    gMFeedBackInfo.ReplyID      = MathUtils.ToInt(reader["ReplyID"]);

                    gMFeedBackInfo.ReplyDate  = MathUtils.ToDateTime(reader["ReplyTime"], DateTime.MinValue);
                    gMFeedBackInfo.CreateDate = MathUtils.ToDateTime(reader["SubmittedTime"], DateTime.MinValue);


                    olist.Add(gMFeedBackInfo);
                }
                return(olist);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        public bool PostFeedBack(FeedbackInfo info)
        {
            CommandStruct command = ConfigManger.Provider.CreateCommandStruct("GMFeedBack", CommandMode.Insert);

            command.AddParameter("UId", info.Uid);
            command.AddParameter("GameID", info.GameID);
            command.AddParameter("ServerID", info.ServerID);
            command.AddParameter("GMType", info.Type);
            command.AddParameter("content", info.Content);
            command.AddParameter("Pid", info.Pid);
            command.AddParameter("NickName", info.NickName);
            command.AddParameter("SubmittedTime", info.CreateDate);
            command.Parser();

            return(ConfigManger.Provider.ExecuteQuery(CommandType.Text, command.Sql, command.Parameters) > 0);
        }
Exemplo n.º 3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="info"></param>
        public bool PostFeedBack(FeedbackInfo info)
        {
            CommandStruct command = new CommandStruct("GMFeedBack", CommandMode.Insert);

            command.AddParameter("UId", SqlDbType.Int, info.Uid);
            command.AddParameter("GameID", SqlDbType.Int, info.GameID);
            command.AddParameter("ServerID", SqlDbType.Int, info.ServerID);
            command.AddParameter("GMType", SqlDbType.Int, info.Type);
            command.AddParameter("content", SqlDbType.VarChar, info.Content);
            command.AddParameter("Pid", SqlDbType.VarChar, info.Pid);
            command.AddParameter("NickName", SqlDbType.VarChar, info.NickName);
            command.AddParameter("SubmittedTime", SqlDbType.DateTime, info.CreateDate);
            command.Parser();

            return(SqlHelper.ExecuteNonQuery(ConfigManger.connectionString, CommandType.Text, command.Sql, command.SqlParameters) > 0);
        }
Exemplo n.º 4
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        public bool PostFeedBack(FeedbackInfo info)
        {
            CommandStruct command = new CommandStruct("GMFeedBack", CommandMode.Insert);
            command.AddParameter("UId", SqlDbType.Int, info.Uid);
            command.AddParameter("GameID", SqlDbType.Int, info.GameID);
            command.AddParameter("ServerID", SqlDbType.Int, info.ServerID);
            command.AddParameter("GMType", SqlDbType.Int, info.Type);
            command.AddParameter("content", SqlDbType.VarChar, info.Content);
            command.AddParameter("Pid", SqlDbType.VarChar, info.Pid);
            command.AddParameter("NickName", SqlDbType.VarChar, info.NickName);
            command.AddParameter("SubmittedTime", SqlDbType.DateTime, info.CreateDate);
            command.Parser();

            return SqlHelper.ExecuteNonQuery(ConfigManger.connectionString, CommandType.Text, command.Sql, command.SqlParameters) > 0;
        }
Exemplo n.º 5
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sql"></param>
        /// <param name="parameters"></param>
        /// <returns></returns>
        private List<FeedbackInfo> GetFeedBackList(string sql, params SqlParameter[] parameters)
        {
            using (SqlDataReader reader = SqlHelper.ExecuteReader(ConfigManger.connectionString, CommandType.Text, sql, parameters))
            {
                List<FeedbackInfo> olist = new List<FeedbackInfo>();
                while (reader.Read())
                {
                    FeedbackInfo gMFeedBackInfo = new FeedbackInfo();
                    gMFeedBackInfo.Uid = MathUtils.ToInt(reader["UId"]);
                    gMFeedBackInfo.GameID = MathUtils.ToInt(reader["GameID"]);
                    gMFeedBackInfo.ServerID = MathUtils.ToInt(reader["ServerID"]);
                    gMFeedBackInfo.Pid = MathUtils.ToNotNullString(reader["Pid"]);
                    gMFeedBackInfo.NickName = MathUtils.ToNotNullString(reader["NickName"]);
                    gMFeedBackInfo.Content = MathUtils.ToNotNullString(reader["content"]);
                    gMFeedBackInfo.ID = MathUtils.ToInt(reader["GMID"]);
                    gMFeedBackInfo.Type = MathUtils.ToInt(reader["GMType"]);
                    gMFeedBackInfo.ReplyContent = MathUtils.ToNotNullString(reader["RContent"]);
                    gMFeedBackInfo.ReplyID = MathUtils.ToInt(reader["ReplyID"]);

                    gMFeedBackInfo.ReplyDate = MathUtils.ToDateTime(reader["ReplyTime"], DateTime.MinValue);
                    gMFeedBackInfo.CreateDate = MathUtils.ToDateTime(reader["SubmittedTime"], DateTime.MinValue);

                    olist.Add(gMFeedBackInfo);
                }
                return olist;
            }

            return null;
        }
Exemplo n.º 6
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="info"></param>
        public bool PostFeedBack(FeedbackInfo info)
        {
            CommandStruct command = ConfigManger.Provider.CreateCommandStruct("GMFeedBack", CommandMode.Insert);
            command.AddParameter("UId", info.Uid);
            command.AddParameter("GameID", info.GameID);
            command.AddParameter("ServerID", info.ServerID);
            command.AddParameter("GMType", info.Type);
            command.AddParameter("content", info.Content);
            command.AddParameter("Pid", info.Pid);
            command.AddParameter("NickName", info.NickName);
            command.AddParameter("SubmittedTime", info.CreateDate);
            command.Parser();

            return ConfigManger.Provider.ExecuteQuery(CommandType.Text, command.Sql, command.Parameters) > 0;
        }