Пример #1
0
        void ShowManutencaoFromItem()
        {
            if (ListView.SelectedItem == null)
            {
                return;
            }
            Manutencao manutencao = new Manutencao
            {
                ShowTitleBar = false,
                GlowBrush = new SolidColorBrush(Colors.DodgerBlue),
                //UiMenu = {Novo = false}
            };
            Manutencao.UiMenu.Novo = false;

            var item = ListView.SelectedItem as UiMenu ?? new UiMenu();

            manutencao.InicializarComboBox(false,OseFunctions.GetNameFromModulo(item.Modulo));
            Manutencao.UiMenu.Tipo = item.Tipo == @"APLICACAO" ? ManutencaoUiMenu.IsType.Aplicacao : ManutencaoUiMenu.IsType.Menu;
            Manutencao.UiMenu.Modulo = item.Modulo;
            Manutencao.UiMenu.Descricao = item.Descricao;
            Manutencao.UiMenu.Privilegio = item.Privilegio;
            Manutencao.UiMenu.ModuloPai = OseFunctions.GetPaiFrom(item.Modulo);

            manutencao.ShowDialog();

            // Atualizar - manutencao.close()
            CallFilterAndLike();
            InicializarListView();
        }
Пример #2
0
        private void CmdCadastra_OnClick(object sender, RoutedEventArgs e)
        {
            Manutencao manutencao = new Manutencao
            {
                ShowTitleBar = false,
                GlowBrush = new SolidColorBrush(Colors.DodgerBlue),
                //UiMenu = { Novo = true }
            };
            Manutencao.UiMenu.Novo = true;
            manutencao.InicializarComboBox(true);
            manutencao.ShowDialog();

            // Atualizar - manutencao.close()
            CallFilterAndLike();
            InicializarListView();

        }