public override void Init(object initData) { base.Init(initData); var x = initData as Tuple <Material, CuidadorPaciente>; Material = new Material(); Unidades = new ObservableCollection <string> { "Cx", "ml", "l", "kg", "g", "mg", "un" }; CuidadorPaciente = new CuidadorPaciente(); if (x != null) { Material = x.Item1; CuidadorPaciente = x.Item2; } oHorario = new PageModelHelper { Quantidade = null }; if (Material.Id == null) { Material = new Material(); oHorario.deleteVisible = false; novoItem = true; } else { SelectedUnidade = Material.MatUnidade; oHorario.deleteVisible = true; oHorario.Quantidade = Material.MatQuantidade; novoItem = false; } }
public override async void Init(object initData) { base.Init(initData); var x = initData as Tuple <Paciente, CuidadorPaciente>; oPaciente = x.Item1; CuidadorPaciente = new CuidadorPaciente(); CuidadorPaciente = x.Item2; oHorario = new PageModelHelper { ActivityRunning = true, Visualizar = false }; await GetMedicamentos(); }
public override void Init(object initData) { base.Init(initData); oPaciente = new Paciente(); CuidadorPaciente = new CuidadorPaciente(); var x = initData as Tuple <Paciente, CuidadorPaciente>; if (x != null) { oPaciente = x.Item1; CuidadorPaciente = x.Item2; } }
public override void Init(object initData) { base.Init(initData); PageModelHelper = new PageModelHelper { Visualizar = true }; Cuidador = new Cuidador(); Paciente = new Paciente(); Cuidador = initData as Cuidador; if (Cuidador != null) { CuidadorPaciente = new CuidadorPaciente { CuiId = Cuidador.Id } } ; }
public override async void Init(object initData) { base.Init(initData); oHorario = new PageModelHelper { HabilitarMaterial = false, HabilitarMedicamento = false, deleteVisible = false }; var x = initData as Tuple <Afazer, Paciente, CuidadorPaciente>; Afazer = new Afazer(); Paciente = new Paciente(); CuidadorPaciente = new CuidadorPaciente(); if (x != null) { if (x.Item1 != null) { Afazer = x.Item1; NewItem = false; } else { NewItem = true; } Paciente = x.Item2; CuidadorPaciente = x.Item3; } Materiais = new ObservableCollection <Material>(await FamiliarRestService.DefaultManager.RefreshMaterialAsync()); Medicamentos = new ObservableCollection <Medicamento>(await FamiliarRestService.DefaultManager.RefreshMedicamentoAsync()); MateriaisUtilizados = new ObservableCollection <MaterialUtilizado>( await FamiliarRestService.DefaultManager.RefreshMaterialUtilizadoAsync(Afazer?.Id)); if (Afazer?.Id != null) { oHorario.deleteVisible = true; } AfazerConcluido = new ConclusaoAfazer(); }
public override void Init(object initData) { base.Init(initData); oHorario = new PageModelHelper { QuantidadeF = 0 }; Unidades = new ObservableCollection <string> { "Cx", "ml", "l", "kg", "g", "mg", "un" }; oViaAdministracaoMedicamento = new ViaAdministracaoMedicamento(); oFormaApresentacaoMedicamento = new FormaApresentacaoMedicamento(); var x = initData as Tuple <Medicamento, CuidadorPaciente>; Medicamento = new Medicamento(); CuidadorPaciente = new CuidadorPaciente(); GetInfoMateriais(); //FormaApresentacaoMedicamento = new FormaApresentacaoMedicamento(); //ViaAdministracaoMedicamento = new ViaAdministracaoMedicamento(); if (x != null) { Medicamento = x.Item1; CuidadorPaciente = x.Item2; oHorario.QuantidadeF = Medicamento.MedQuantidade; } if (Medicamento.Id == null) { Medicamento = new Medicamento(); oHorario.deleteVisible = false; alterar = true; } else { oHorario.deleteVisible = true; alterar = false; } }
public override async void Init(object initData) { base.Init(initData); Color = new Color(); SelectedColor = new ColorList(); oHorario = new PageModelHelper { HabilitarMaterial = false, HabilitarMedicamento = false, deleteVisible = false }; MotivoNaoConclusaoTarefa = new MotivoNaoConclusaoTarefa(); var x = initData as Tuple <Afazer, Paciente, CuidadorPaciente, DateTime>; Afazer = new Afazer(); Paciente = new Paciente(); CuidadorPaciente = new CuidadorPaciente(); if (x != null) { if (x.Item1 != null) { Afazer = x.Item1; NewItem = false; oHorario.deleteVisible = true; } else { NewItem = true; } Paciente = x.Item2; CuidadorPaciente = x.Item3; oHorario.Data = x.Item4; oHorario.DataTermino = x.Item4.AddDays(1); } AfazerConcluido = new ConclusaoAfazer(); ListaCores = new ObservableCollection <ColorList> { new ColorList { Cor = "Padrão", Color = Color.Default }, new ColorList { Cor = "Laranja escuro", Color = Color.FromHex("#FF5722") }, new ColorList { Cor = "Cinza azulado", Color = Color.FromHex("#607D8B") }, new ColorList { Cor = "Ciano", Color = Color.FromHex("#00BCD4") }, new ColorList { Cor = "Roxo escuro", Color = Color.FromHex("#673AB7") }, new ColorList { Cor = "Cinza", Color = Color.FromHex("#9E9E9E") }, new ColorList { Cor = "Azul claro", Color = Color.FromHex("#02A8F3") }, new ColorList { Cor = "Vermelho", Color = Color.FromHex("#D32F2F") }, }; // colorDict = new Dictionary<string, Color> //{ // { "Default", Color.Default }, { "Amber", Color.FromHex("#FFC107") }, // { "Black", Color.FromHex("#212121") }, { "Blue", Color.FromHex("#2196F3") }, // { "Blue Grey", Color.FromHex("#607D8B") }, { "Brown", Color.FromHex("#795548") }, // { "Cyan", Color.FromHex("#00BCD4") }, { "Dark Orange", Color.FromHex("#FF5722") }, // { "Dark Purple", Color.FromHex("#673AB7") }, { "Green", Color.FromHex("#4CAF50") }, // { "Grey", Color.FromHex("#9E9E9E") }, { "Indigo", Color.FromHex("#3F51B5") }, // { "Light Blue", Color.FromHex("#02A8F3") }, { "Light Green", Color.FromHex("#8AC249") }, // { "Lime", Color.FromHex("#CDDC39") }, { "Orange", Color.FromHex("#FF9800") }, // { "Pink", Color.FromHex("#E91E63") }, { "Purple", Color.FromHex("#94499D") }, // { "Red", Color.FromHex("#D32F2F") }, { "Teal", Color.FromHex("#009587") }, // { "White", Color.FromHex("#FFFFFF") }, { "Yellow", Color.FromHex("#FFEB3B") }, //}; }