Esempio n. 1
0
        /// <summary>
        /// This method return the view of the command Table description
        /// </summary>
        /// <returns></returns>
        public async Task <ActionResult> Index()
        {
            CommandListViewModel cmdList = new CommandListViewModel();

            try
            {
                string commandListUrl = apiUrl + "GetCommandList";

                HttpResponseMessage responseMessage = await client.GetAsync(commandListUrl);

                if (responseMessage.IsSuccessStatusCode)
                {
                    var responseData = responseMessage.Content.ReadAsStringAsync().Result;
                    cmdList = new JavaScriptSerializer().Deserialize <CommandListViewModel>(responseData);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(View(cmdList));
        }
Esempio n. 2
0
 public AddProgramViewModel()
 {
     CommandAddViewModel = new CommandListViewModel();
     CommandAddControl   = new CommandListControl().AsProxy();
 }