Example #1
0
        public ActionResult Index()
        {
            PatOBInfo jobject = new PatOBInfo
            {
                acokey     = 1,
                practiceid = 1,
                userid     = "1",
                searchtext = "",
                option     = 1,
                viewall    = 1
            };

            ViewData["list"] = PostDataModel.PostAsyncWebApi_Test(jobject);
            return(View());
        }
Example #2
0
        public ActionResult Index()
        {
            PatOBInfo jobject = new PatOBInfo();

            jobject.id                 = "1";
            jobject.language           = "1";
            jobject.language_eng       = "1";
            jobject.language_main_code = "";
            jobject.url                = "1";
            katInfo katobje = new katInfo();

            katobje.id          = "";
            katobje.name        = "";
            ViewData["katlist"] = aloacilusta(katobje);
            ViewData["list"]    = aloacilusta(jobject);
            return(View());
        }
Example #3
0
        public List <PatOBInfo> aloacilusta(PatOBInfo product)
        {
            List <PatOBInfo> list = new List <PatOBInfo>();

            using (var client = new HttpClient())
            {
                client.BaseAddress = new Uri("http://185.86.4.73");
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

                StringContent content = new StringContent(JsonConvert.SerializeObject(product), System.Text.Encoding.UTF8, "application/json");
                // HTTP POST
                HttpResponseMessage response = client.GetAsync("ustalar/Slim_Proxy_usta/SlimProxyBoot.php?url=fillComboBox_syslanguage").Result;
                string data1 = response.Content.ReadAsStringAsync().Result;
                if (response.IsSuccessStatusCode)
                {
                    string data = response.Content.ReadAsStringAsync().Result;
                    list = JsonConvert.DeserializeObject <List <PatOBInfo> >(data);
                }
            }
            ViewBag.Message = list;
            return(list);
        }