/// <summary>
        /// برگرداندن بهترین حقوقها در حال حاضر
        /// </summary>
        /// <returns></returns>
        public IHttpActionResult Get(int id)
        {
            string UrlParameter = null;
            int    intType, intSubtype = 1;

            if (id < 10)
            {
                switch (id)
                {
                case 5:
                    intType = 7;
                    break;

                case 6:
                    intType = 12;
                    break;

                case 7:
                    intType = 17;
                    break;

                //از یک تا چهار
                default:
                    intType = id;
                    break;
                }

                UrlParameter = "?id=" + intType;
            }
            else
            {
                intType      = id / 10;
                intSubtype   = id % 10;
                UrlParameter = "?id=" + intType + "&calidad=" + intSubtype;
            }

            string URL = "http://erepublikanalyzer.com/MercadoRanking.aspx" + UrlParameter;

            try
            {
                WebRequest             http     = (HttpWebRequest)WebRequest.Create(URL);
                WebResponse            response = http.GetResponse();
                System.IO.Stream       stream   = response.GetResponseStream();
                System.IO.StreamReader sr       = new System.IO.StreamReader(stream);
                string stringWebpage            = sr.ReadToEnd();

                List <BestPricesViewModel>    JsonResult = ExtractData(stringWebpage);
                BestPricesCollectionViewModel Result     = new BestPricesCollectionViewModel();
                Result.BestPricesCollection = JsonResult;
                Result.ProductType          = intType;
                Result.ProductSubType       = intSubtype;
                return(Ok(Result));
            }
            catch (Exception ex)
            {
                return(NotFound());
                //stringJsonResult = ex.Message;
            }
        }
        public ActionResult GetData(int id)
        {
            BestPricesCollectionViewModel result = new BestPricesCollectionViewModel();
            string stringHost   = Request.ServerVariables.GetValues("HTTP_HOST")[0];
            string StringApiUrl = "http://" + stringHost + "/api/BestPricesApi/" + id;

            using (HttpClient HttpClient = new HttpClient())
            {
                Task <string> response = HttpClient.GetStringAsync(StringApiUrl);
                result = JsonConvert.DeserializeObjectAsync <BestPricesCollectionViewModel>(response.Result).Result;
            }
            if (!Request.IsAjaxRequest())
            {
                return(View());
            }
            else
            {
                return(PartialView("_BestPrices", result));
            }
        }