示例#1
0
        /// <summary>
        /// 提交GMTOOLS新BUG信息
        /// </summary>
        /// <returns></returns>
        public Message Bug_Insert()
        {
            int    userbyID   = 0;
            string bugSubject = null;
            string bugContext = null;
            int    gameID     = 0;;
            int    bugType    = 0;
            //int bugSender =0;
            //string result = null ;
            TLV_Structure tlvStrut = new TLV_Structure(TagName.UserByID, 4, message.m_packet.m_Body.getTLVByTag(TagName.UserByID).m_bValueBuffer);

            userbyID   = (int)tlvStrut.toInteger();
            bugSubject = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.Bug_Subject).m_bValueBuffer);
            bugContext = System.Text.Encoding.Default.GetString(message.m_packet.m_Body.getTLVByTag(TagName.Bug_Context).m_bValueBuffer);
            tlvStrut   = new TLV_Structure(TagName.GameID, 4, message.m_packet.m_Body.getTLVByTag(TagName.GameID).m_bValueBuffer);
            gameID     = (int)tlvStrut.toInteger();
            tlvStrut   = new TLV_Structure(TagName.Bug_Type, 4, message.m_packet.m_Body.getTLVByTag(TagName.Bug_Type).m_bValueBuffer);
            bugType    = (int)tlvStrut.toInteger();
            //tlvStrut = new TLV_Structure(TagName.Bug_Sender, 4, message.m_packet.m_Body.getTLVByTag(TagName.Bug_Sender).m_bValueBuffer);
            //bugSender = (int)tlvStrut.toInteger();
            //tlvStrut = new TLV_Structure(TagName.Bug_Date, 4, message.m_packet.m_Body.getTLVByTag(TagName.Bug_Date).m_bValueBuffer);
            //bugDate = tlvStrut.toDate();
            int status = CommonInfo.BugList_Insert(userbyID, bugSubject, bugContext, gameID, bugType);

            if (status == 1)
            {
                SqlHelper.log.WriteLog(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + bugSubject + LanguageAPI.API_Submit + LanguageAPI.API_Success);
                Console.WriteLine(DateTime.Now + " - gmtools bug " + bugSubject + LanguageAPI.API_Submit + LanguageAPI.API_Success);
                return(Message.COMMON_MES_RESP(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + LanguageAPI.API_Submit + LanguageAPI.API_Success, Msg_Category.COMMON, ServiceKey.GMTOOLS_BUGLIST_UPDATE_RESP));
            }
            else
            {
                SqlHelper.log.WriteLog(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + bugSubject + LanguageAPI.API_Submit + LanguageAPI.API_Failure);
                Console.WriteLine(DateTime.Now + " - gmtools bug " + bugSubject + LanguageAPI.API_Submit + LanguageAPI.API_Failure);
                return(Message.COMMON_MES_RESP(LanguageAPI.ServerSocket_ServerSocket_GMTools_Title + " bug " + LanguageAPI.API_Submit + LanguageAPI.API_Failure, Msg_Category.COMMON, ServiceKey.GMTOOLS_BUGLIST_UPDATE_RESP));
            }
        }