コード例 #1
0
ファイル: AmbienteDetail.cs プロジェクト: pmacri/NPCE_Client
 protected override async Task OnInitializedAsync()
 {
     try
     {
         Ambiente = await AmbientiDataService.GetAmbienteDetail((int.Parse(AmbienteId)));
     }
     catch (Exception)
     {
         throw;
     }
 }
コード例 #2
0
        protected override async Task OnInitializedAsync()
        {
            Saved = false;

            int ambienteId;

            int.TryParse(AmbienteId, out ambienteId);

            if (ambienteId == 0) //new ambiente is being created
            {
                //add some defaults
                Ambiente = new Ambiente();
            }
            else
            {
                Ambiente = await AmbientiDataService.GetAmbienteDetail(ambienteId);
            }
        }