Esempio n. 1
0
        private void ExecuteCommandBlockAutor(object obj)
        {
            mTiposGenericos Tg = new mTiposGenericos();

            var objetos   = (object[])obj;
            var bloqueado = (CheckBox)objetos[1];

            Tg.Codigo    = (int)objetos[0];
            Tg.Bloqueado = (bool)bloqueado.IsChecked;

            new mData().BlockNoBlock(SqlCollections.Autor_Block_NoBlock, Tg);
        }
Esempio n. 2
0
        private void ExecuteCommandInsertAutor(object obj)
        {
            mTiposGenericos Tgeneric = new mTiposGenericos();

            Tgeneric.Codigo    = 0;
            Tgeneric.Nome      = NovoAutor;
            Tgeneric.Cadastro  = DateTime.Now;
            Tgeneric.Alterado  = DateTime.Now;
            Tgeneric.Bloqueado = false;

            if (MessageBox.Show("Adicionar novo Autor?", "Sim.Apps.Alerta", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                if (new mData().InsertTiposGenericos(SqlCollections.Autor_Insert, SqlCollections.Autor_Last_Codigo, Tgeneric) == true)
                {
                    Autores = new mListaTiposGenericos().GoList(SqlCollections.Autor_All);
                }
            }

            NovoAutor = string.Empty;
        }