Beispiel #1
0
 public void Save()
 {
     foreach (ModelStatement ms in Statements)
     {
         MDFeNetConfig.WriteStatementForModel(ms.ModelName, ms.Statement);
     }
 }
        private void FillFromLocal()
        {
            DatasourceConfiguration conf = MDFeNetConfig.ReadFromLocal();

            cbTipoBanco.SelectedValue = conf.DataProvider;
            txServidor.Text           = conf.Datasource;
            txUsuario.Text            = conf.UserId;
            txSenha.Password          = conf.Password;
            txNomeBanco.Text          = conf.InitialCatalog;
        }
Beispiel #3
0
 private void btExecutar_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         DatasourceConfiguration conf = MDFeNetConfig.ReadFromLocal();
         DataTable dt = conf.RetrieveDataFromSql(txSQL.Text);
         dataGrid.ItemsSource = dt.DefaultView;
     }
     catch (Exception ex)
     {
         MsgBox.SimpleText(ex.Message);
     }
 }
Beispiel #4
0
        private void FillListBox()
        {
            /*
             * Emitente
             * Motorista
             * Veiculo
             * Autorizado ( pode ser inserido na hora tbm)
             * NFeVinculada ( chaves de acesso escolhidas de uma listagem de notas do banco)
             * a classe IdeMDFe tem algumas propriedqades q vem do bd e outras nao
             *
             */

            Statements.Add(new ModelStatement("Emitente", MDFeNetConfig.ReadStatementForModel("Emitente")));
            Statements.Add(new ModelStatement("Motorista", MDFeNetConfig.ReadStatementForModel("Motorista")));
            Statements.Add(new ModelStatement("Veiculo", MDFeNetConfig.ReadStatementForModel("Veiculo")));
            Statements.Add(new ModelStatement("Autorizado", MDFeNetConfig.ReadStatementForModel("Autorizado")));
            Statements.Add(new ModelStatement("NFeVinculada", MDFeNetConfig.ReadStatementForModel("NFeVinculada")));

            listBox.ItemsSource   = Statements;
            listBox.SelectedIndex = 0;
        }
Beispiel #5
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            string sql = @"SELECT CNPJ, RAZAO_SOCIAL, NOME_FANTASIA, FROM LOJAS";

            MDFeNetConfig.WriteStatementForModel("Emitente", sql);
        }
 public void Save()
 {
     MDFeNetConfig.SaveToLocal(GetConfig());
 }