public HttpResponseMessage SaveData([FromUri] EnquirySavaQuery query)
        {
            string host_ip = Request.GetClientIpAddress();

            string basePath = System.AppDomain.CurrentDomain.BaseDirectory;//纯真IP数据文件路径..

            QQWry.NET.QQWryLocator2 qqWry2 = new QQWry.NET.QQWryLocator2(basePath + "\\Models\\QQWry.dat");
            QQWry.NET.IPLocation    ip2    = qqWry2.Query(host_ip); //查询一个IP地址

            string country     = ip2.Country;
            string email       = query.email;
            string content     = query.content;
            string productName = query.productName;
            string yourName    = query.yourName;
            string company     = query.company;
            string tel         = query.tel;
            string msn         = query.msn;
            string language    = query.language;   //访问语言
            string recievedId  = query.recievedId; //接受者

            EnquiryService.EnquirySave(host_ip, email, content, productName, productName, yourName, company, tel, msn, language, country, recievedId);
            List <string> retList   = new List <string>();
            var           returnObj = new ResultObject <List <string> >();

            retList.Add("leave message success!");
            returnObj.ReturnData = retList;
            returnObj.Status     = ServerStatus.SaveSuccess;
            return(Request.CreateResponse <ResultObject <List <string> > >(HttpStatusCode.OK, returnObj));
        }
        public HttpResponseMessage visitorRecordSave([FromUri] VisitorRecordSaveQuery query)
        {
            string purchaserIp      = Request.GetClientIpAddress();
            string purchaserProduct = string.Empty;
            string language         = string.Empty;
            string purchaserDomain  = string.Empty;
            string targetEmail      = string.Empty;

            if (!string.IsNullOrWhiteSpace(query.PurchaserProduct))
            {
                purchaserProduct = query.PurchaserProduct;
            }
            if (!string.IsNullOrWhiteSpace(query.Language))
            {
                language = query.Language;
            }
            if (!string.IsNullOrWhiteSpace(query.PurchaserDomain))
            {
                purchaserDomain = query.PurchaserDomain;
            }
            if (!string.IsNullOrWhiteSpace(query.TargetEmail))
            {
                targetEmail = query.TargetEmail;
            }

            string basePath = System.AppDomain.CurrentDomain.BaseDirectory;//纯真IP数据文件路径..

            QQWry.NET.QQWryLocator2 qqWry2 = new QQWry.NET.QQWryLocator2(basePath + "\\Models\\QQWry.dat");
            QQWry.NET.IPLocation    ip2    = qqWry2.Query(purchaserIp); //查询一个IP地址
            string puchaserCountry         = ip2.Country;

            Business.Serives.VisitRecordService.VisitRecordSave(purchaserIp, purchaserProduct, language, puchaserCountry, purchaserDomain, targetEmail);
            List <string> retList   = new List <string>();
            var           returnObj = new ResultObject <List <string> >();

            //retList.Add("save record success!");
            returnObj.ReturnData = retList;
            returnObj.Status     = ServerStatus.SaveSuccess;
            try
            {
                return(Request.CreateResponse <ResultObject <List <string> > >(HttpStatusCode.OK, returnObj));
            }
            catch (Exception ex)
            {
                LogHelper.Error("visitorRecordSave", ex);
            }
            return(null);
        }
        public HttpResponseMessage visitorRecordSave([FromUri]VisitorRecordSaveQuery query)
        {
            string purchaserIp = Request.GetClientIpAddress();
            string purchaserProduct = string.Empty;
            string language = string.Empty;
            string purchaserDomain = string.Empty;
            string targetEmail = string.Empty;

            if (!string.IsNullOrWhiteSpace(query.PurchaserProduct))
            {
                purchaserProduct = query.PurchaserProduct;
            }
            if (!string.IsNullOrWhiteSpace(query.Language))
            {
                language = query.Language;
            }
            if (!string.IsNullOrWhiteSpace(query.PurchaserDomain))
            {
                purchaserDomain = query.PurchaserDomain;
            }
            if (!string.IsNullOrWhiteSpace(query.TargetEmail))
            {
                targetEmail = query.TargetEmail;
            }

            string basePath = System.AppDomain.CurrentDomain.BaseDirectory;//纯真IP数据文件路径..
            QQWry.NET.QQWryLocator2 qqWry2 = new QQWry.NET.QQWryLocator2(basePath + "\\Models\\QQWry.dat");
            QQWry.NET.IPLocation ip2 = qqWry2.Query(purchaserIp);  //查询一个IP地址
            string puchaserCountry =ip2.Country;

            Business.Serives.VisitRecordService.VisitRecordSave(purchaserIp, purchaserProduct, language, puchaserCountry, purchaserDomain, targetEmail);
            List<string> retList = new List<string>();
            var returnObj = new ResultObject<List<string>>();
            //retList.Add("save record success!");
            returnObj.ReturnData = retList;
            returnObj.Status = ServerStatus.SaveSuccess;
            try
            {
                return Request.CreateResponse<ResultObject<List<string>>>(HttpStatusCode.OK, returnObj);
            }
            catch (Exception ex)
            {
                LogHelper.Error("visitorRecordSave", ex);
            }
            return null;
        }