public readInfoByIdNotiForm ReadInfoByIdNotificationHead(int IdNotification)
        {
            readInfoByIdNotiForm myData = new readInfoByIdNotiForm();
            var myNoti = _repHeader.ReadInfoByIdNotificationHead(IdNotification);

            myData.ReadInfoByNoti = myNoti;

            List <SimpleRef> LevelUrgensiList = new List <SimpleRef>();

            LevelUrgensiList.Add(new SimpleRef()
            {
                RefId = 1, RefDescription = "Kritikal"
            });
            LevelUrgensiList.Add(new SimpleRef()
            {
                RefId = 2, RefDescription = "Penting"
            });
            LevelUrgensiList.Add(new SimpleRef()
            {
                RefId = 3, RefDescription = "Normal"
            });
            myData.LevelUrgensiColls = LevelUrgensiList;

            return(myData);
        }
Beispiel #2
0
        public ActionResult _ReadInfoByIdNotification(int IdNotificationDetail, readInfoByIdNotiForm myDataForm)
        {
            HttpResponseMessage responseMessage = client.GetAsync(urlHeader + "/ReadInfoByIdNotification/" + IdNotificationDetail.ToString()).Result;

            if (responseMessage.IsSuccessStatusCode)
            {
                var responseData = responseMessage.Content.ReadAsStringAsync().Result;
                var myData       = JsonConvert.DeserializeObject <readInfoByIdNotiForm>(responseData);
                return(View(myData));
            }
            return(View("Error"));
        }