/// <summary>
 /// Deprecated Method for adding a new object to the gn_common_201204181300 EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddTogn_common_201204181300(gn_common_201204181300 gn_common_201204181300)
 {
     base.AddObject("gn_common_201204181300", gn_common_201204181300);
 }
 public void LoadData(gn_common_201204181300 m, ref ConcurrentBag<mpos_gn_common> gnbag)
 {
     if (m.Event_Type == 4 || m.Event_Type == 5)
         if (m.APN.Length > 1)
             gnbag.Add(convert(m));
 }
 /// <summary>
 /// Create a new gn_common_201204181300 object.
 /// </summary>
 /// <param name="abnormal_reason">Initial value of the Abnormal_reason property.</param>
 /// <param name="abort">Initial value of the abort property.</param>
 /// <param name="aPN">Initial value of the APN property.</param>
 /// <param name="cI">Initial value of the CI property.</param>
 /// <param name="content_Type">Initial value of the Content_Type property.</param>
 /// <param name="delete_PDP">Initial value of the Delete_PDP property.</param>
 /// <param name="delete_PDP_Direction">Initial value of the Delete_PDP_Direction property.</param>
 /// <param name="dEST_IP">Initial value of the DEST_IP property.</param>
 /// <param name="disconnect">Initial value of the Disconnect property.</param>
 /// <param name="duration">Initial value of the Duration property.</param>
 /// <param name="end_Date_Time">Initial value of the End_Date_Time property.</param>
 /// <param name="event_Type">Initial value of the Event_Type property.</param>
 /// <param name="gGSN">Initial value of the GGSN property.</param>
 /// <param name="gGSN_IP">Initial value of the GGSN_IP property.</param>
 /// <param name="iMEI">Initial value of the IMEI property.</param>
 /// <param name="iMSI">Initial value of the IMSI property.</param>
 /// <param name="iP_LEN_DL">Initial value of the IP_LEN_DL property.</param>
 /// <param name="iP_LEN_UL">Initial value of the IP_LEN_UL property.</param>
 /// <param name="isReassemble">Initial value of the IsReassemble property.</param>
 /// <param name="is_UserAbnormal">Initial value of the Is_UserAbnormal property.</param>
 /// <param name="lAC">Initial value of the LAC property.</param>
 /// <param name="mMS_request">Initial value of the MMS_request property.</param>
 /// <param name="mSISDN">Initial value of the MSISDN property.</param>
 /// <param name="online_ID">Initial value of the Online_ID property.</param>
 /// <param name="prefix_IMEI">Initial value of the Prefix_IMEI property.</param>
 /// <param name="pROTOCOL">Initial value of the PROTOCOL property.</param>
 /// <param name="rAT_TYPE">Initial value of the RAT_TYPE property.</param>
 /// <param name="repeat_Count">Initial value of the Repeat_Count property.</param>
 /// <param name="result">Initial value of the Result property.</param>
 /// <param name="sAC">Initial value of the SAC property.</param>
 /// <param name="service_TYPE">Initial value of the Service_TYPE property.</param>
 /// <param name="session_ID">Initial value of the Session_ID property.</param>
 /// <param name="sGSN">Initial value of the SGSN property.</param>
 /// <param name="sGSN_IP">Initial value of the SGSN_IP property.</param>
 /// <param name="sOURCE_IP">Initial value of the SOURCE_IP property.</param>
 /// <param name="start_Date_Time">Initial value of the Start_Date_Time property.</param>
 /// <param name="sub_Service_Type">Initial value of the Sub_Service_Type property.</param>
 /// <param name="uRI">Initial value of the URI property.</param>
 /// <param name="uRI_Main">Initial value of the URI_Main property.</param>
 /// <param name="user_Agent_Main">Initial value of the User_Agent_Main property.</param>
 public static gn_common_201204181300 Creategn_common_201204181300(global::System.Int32 abnormal_reason, global::System.Boolean abort, global::System.String aPN, global::System.Int64 cI, global::System.String content_Type, global::System.Boolean delete_PDP, global::System.Boolean delete_PDP_Direction, global::System.Int64 dEST_IP, global::System.Boolean disconnect, global::System.Decimal duration, global::System.DateTimeOffset end_Date_Time, global::System.SByte event_Type, global::System.String gGSN, global::System.Int64 gGSN_IP, global::System.String iMEI, global::System.String iMSI, global::System.Int64 iP_LEN_DL, global::System.Int64 iP_LEN_UL, global::System.Boolean isReassemble, global::System.Int64 is_UserAbnormal, global::System.Int64 lAC, global::System.Boolean mMS_request, global::System.Decimal mSISDN, global::System.Decimal online_ID, global::System.String prefix_IMEI, global::System.SByte pROTOCOL, global::System.Byte rAT_TYPE, global::System.Int32 repeat_Count, global::System.Boolean result, global::System.Int64 sAC, global::System.Int32 service_TYPE, global::System.Decimal session_ID, global::System.String sGSN, global::System.Int64 sGSN_IP, global::System.Int64 sOURCE_IP, global::System.DateTimeOffset start_Date_Time, global::System.Int32 sub_Service_Type, global::System.String uRI, global::System.String uRI_Main, global::System.String user_Agent_Main)
 {
     gn_common_201204181300 gn_common_201204181300 = new gn_common_201204181300();
     gn_common_201204181300.Abnormal_reason = abnormal_reason;
     gn_common_201204181300.abort = abort;
     gn_common_201204181300.APN = aPN;
     gn_common_201204181300.CI = cI;
     gn_common_201204181300.Content_Type = content_Type;
     gn_common_201204181300.Delete_PDP = delete_PDP;
     gn_common_201204181300.Delete_PDP_Direction = delete_PDP_Direction;
     gn_common_201204181300.DEST_IP = dEST_IP;
     gn_common_201204181300.Disconnect = disconnect;
     gn_common_201204181300.Duration = duration;
     gn_common_201204181300.End_Date_Time = end_Date_Time;
     gn_common_201204181300.Event_Type = event_Type;
     gn_common_201204181300.GGSN = gGSN;
     gn_common_201204181300.GGSN_IP = gGSN_IP;
     gn_common_201204181300.IMEI = iMEI;
     gn_common_201204181300.IMSI = iMSI;
     gn_common_201204181300.IP_LEN_DL = iP_LEN_DL;
     gn_common_201204181300.IP_LEN_UL = iP_LEN_UL;
     gn_common_201204181300.IsReassemble = isReassemble;
     gn_common_201204181300.Is_UserAbnormal = is_UserAbnormal;
     gn_common_201204181300.LAC = lAC;
     gn_common_201204181300.MMS_request = mMS_request;
     gn_common_201204181300.MSISDN = mSISDN;
     gn_common_201204181300.Online_ID = online_ID;
     gn_common_201204181300.Prefix_IMEI = prefix_IMEI;
     gn_common_201204181300.PROTOCOL = pROTOCOL;
     gn_common_201204181300.RAT_TYPE = rAT_TYPE;
     gn_common_201204181300.Repeat_Count = repeat_Count;
     gn_common_201204181300.Result = result;
     gn_common_201204181300.SAC = sAC;
     gn_common_201204181300.Service_TYPE = service_TYPE;
     gn_common_201204181300.Session_ID = session_ID;
     gn_common_201204181300.SGSN = sGSN;
     gn_common_201204181300.SGSN_IP = sGSN_IP;
     gn_common_201204181300.SOURCE_IP = sOURCE_IP;
     gn_common_201204181300.Start_Date_Time = start_Date_Time;
     gn_common_201204181300.Sub_Service_Type = sub_Service_Type;
     gn_common_201204181300.URI = uRI;
     gn_common_201204181300.URI_Main = uRI_Main;
     gn_common_201204181300.User_Agent_Main = user_Agent_Main;
     return gn_common_201204181300;
 }
        public mpos_gn_common convert(gn_common_201204181300 m)
        {
            //Console.WriteLine(m.Session_ID);
            mpos_gn_common gn = new mpos_gn_common();
            gn.Abnormal_reason = (int?)m.Abnormal_reason;
            //文本解释转换
            gn.my_Abnormal_reason = MySqlConvert0.getAbnormalReason(m.Abnormal_reason);
            gn.abort = m.abort == true ? 1 : 0;
            gn.Ack = (int?)m.Ack;
            gn.APN = m.APN;
            gn.CI = (int?)m.CI;
            gn.Content_Type = m.Content_Type;//
            //文本解释转换
            gn.my_Content_Type = MySqlConvert0.getContentTypeHeader(m.Content_Type);
            gn.Count_Packet_DL = (int?)m.Count_Packet_DL;
            gn.Count_Packet_UL = (int?)m.Count_Packet_UL;
            gn.Delete_PDP = m.Delete_PDP;
            gn.Delete_PDP_Direction = m.Delete_PDP_Direction;
            gn.Delivery_Report = m.Delivery_Report;
            gn.DEST_IP = m.DEST_IP;
            //文本解释转换
            gn.my_DEST_IP = MySqlConvert0.getIpAddress((int)m.DEST_IP);
            gn.DEST_PORT = m.DEST_PORT;
            gn.Disconnect = m.Disconnect;
            gn.DNS_TTL = (int?)m.DNS_TTL;
            gn.Duration = m.Duration;
            gn.End_Date_Time = DateTime.Parse(m.End_Date_Time.ToString());
            gn.ErrorPacketLost = (int?)m.ErrorPacketLost;
            gn.ErrorPacketWired = (int?)m.ErrorPacketWired;
            gn.ErrorPacketWireless = (int?)m.ErrorPacketWireless;
            gn.Event_Type = (int?)m.Event_Type;
            //文本解释转换
            gn.my_Event_Type = MySqlConvert0.getEventType(m.Event_Type);
            gn.From = m.From;
            gn.GGSN = m.GGSN;
            gn.GGSN_IP = m.GGSN_IP;
            gn.Identifier = (int?)m.Identifier;
            gn.IMEI = m.IMEI;
            gn.IMSI = m.IMSI;
            gn.IP_LEN_DL = (int?)m.IP_LEN_DL;
            gn.IP_LEN_UL = (int?)m.IP_LEN_UL;
            gn.IpLenDlAck = (int?)m.IpLenDlAck;
            gn.IpLenUpAck = (int?)m.IpLenUpAck;
            gn.Is_UserAbnormal = (int?)m.Is_UserAbnormal;
            gn.IsReassemble = m.IsReassemble;
            gn.LAC = (int?)m.LAC;
            gn.MMS_request = m.MMS_request;
            gn.MMS_resp_status = m.MMS_resp_status;
            gn.MSISDN = (long)m.MSISDN;
            gn.Online_ID = (long)m.Online_ID;
            gn.Prefix_IMEI = m.Prefix_IMEI;
            gn.PROTOCOL = m.PROTOCOL;
            //文本解释转换
            gn.my_Protocol = MySqlConvert0.getProtocol(m.PROTOCOL);
            gn.Query_Name = m.Query_Name;//
            gn.Query_Type = m.Query_Type;
            gn.RAT_TYPE = m.RAT_TYPE;
            //文本解释转换
            gn.my_RAT_TYPE = MySqlConvert0.getRateType(m.RAT_TYPE);
            gn.Repeat_Count = (int?)m.Repeat_Count;
            gn.Resp = m.Resp;
            gn.Resp_cause = m.Resp_cause;
            gn.Resp_DelayFirst = (int?)m.Resp_DelayFirst;
            gn.Result = m.Result;
            gn.Result_DelayFirst = m.Result_DelayFirst;
            gn.SAC = (int?)m.SAC;
            gn.Service_TYPE = m.Service_TYPE;
            //文本解释转换
            gn.my_Service_TYPE = MySqlConvert0.getServiceType(m.Service_TYPE);
            gn.Session_ID = (long)m.Session_ID;
            gn.SGSN = m.SGSN;
            gn.SGSN_IP = m.SGSN_IP;
            gn.SOURCE_IP = m.SOURCE_IP;
            //文本解释转换
            gn.my_SOURCE_IP = MySqlConvert0.getIpAddress((int)m.SOURCE_IP);
            gn.SOURCE_PORT = m.SOURCE_PORT;
            gn.SP_Address = m.SP_Address;
            gn.Start_Date_Time = DateTime.Parse(m.Start_Date_Time.ToString());
            gn.Sub_Service_Type = m.Sub_Service_Type;
            //文本解释转换
            gn.my_Sub_Service_Type = MySqlConvert0.getSubServiceType(m.Sub_Service_Type);
            gn.Subject = m.Subject;//
            gn.SynDirection = (int?)m.SynDirection;
            gn.To = m.To;//
            gn.URI = m.URI;//
            //文本解释转换
            gn.my_URI_Len = MySqlConvert0.getURI_Control_N(m.URI);
            gn.my_URI_IMEI = MySqlConvert0.getURI_IMEI(m.URI);
            gn.my_URI_UA = MySqlConvert0.getURI_UA(m.URI);

            gn.my_URI_UA_MS_Type = MySqlConvert0.getURI_MS_Type(gn.my_URI_UA);
            gn.my_URI_UA_Weibo_Ver = MySqlConvert0.getURI_Weibo_Ver(gn.my_URI_UA);
            gn.my_URI_UA_OS = MySqlConvert0.getURI_OS(gn.my_URI_UA);

            gn.URI_Main = m.URI_Main;//
            //正则表达式转换
            gn.my_URI_Main = MySqlConvert0.getUriMain(m.URI_Main);//
            //获取uri的主机的二级页面,即网页内容
            gn.my_URI_Main_header = MySqlConvert0.getUriMainHeader(m.URI_Main);
            gn.User_Agent_Main = m.User_Agent_Main;//

            return gn;
        }