Example #1
0
        private void ExecuteCommandBlockClassificacao(object obj)
        {
            mClassificacao generic = new mClassificacao();

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

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

            new mData().BlockNoBlockClassificacao(SqlCollections.Classi_Block_Non_Block, generic);
        }
Example #2
0
        private void ExecuteCommandInsertClassificacao(object obj)
        {
            mClassificacao generic = new mClassificacao();

            generic.Codigo    = 0;
            generic.Nome      = NovaClassificacao;
            generic.Cadastro  = DateTime.Now;
            generic.Alterado  = DateTime.Now;
            generic.Bloqueado = false;

            if (MessageBox.Show("Adicionar nova ClassificaĆ§Ć£o?", "Sim.Apps.Alerta", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                if (new mData().InsertClassificacao(SqlCollections.Insert_Classi, SqlCollections.Classi_Last_Row, generic) == true)
                {
                    Classificacoes = new mData().ListaGenerica(SqlCollections.Classi_With_Blocked);
                }
            }

            NovaClassificacao = string.Empty;
        }