コード例 #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));
        }
コード例 #2
0
ファイル: AddProgramViewModel.cs プロジェクト: shoter/Robots
 public AddProgramViewModel()
 {
     CommandAddViewModel = new CommandListViewModel();
     CommandAddControl   = new CommandListControl().AsProxy();
 }