Exemple #1
0
 private void InserirLacre()
 {
     if (bsBomba.Current != null)
     {
         using (TFCadLacre fLacre = new TFCadLacre())
         {
             if (fLacre.ShowDialog() == DialogResult.OK)
             {
                 if (fLacre.rLacre != null)
                 {
                     (bsBomba.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_BombaAbastecimento).lLacre.Add(fLacre.rLacre);
                     bsBomba.ResetCurrentItem();
                 }
             }
         }
     }
 }
Exemple #2
0
 private void AlterarLacre()
 {
     if (bsLacre.Current != null)
     {
         using (TFCadLacre fLacre = new TFCadLacre())
         {
             string   nr_lacre = (bsLacre.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_LacreBomba).Nr_lacre;
             DateTime dt_lacre = (bsLacre.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_LacreBomba).Dt_aplicacao.Value;
             fLacre.rLacre = bsLacre.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_LacreBomba;
             if (fLacre.ShowDialog() != DialogResult.OK)
             {
                 (bsLacre.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_LacreBomba).Nr_lacre     = nr_lacre;
                 (bsLacre.Current as CamadaDados.PostoCombustivel.Cadastros.TRegistro_LacreBomba).Dt_aplicacao = dt_lacre;
                 bsLacre.ResetCurrentItem();
             }
         }
     }
 }