Пример #1
0
 protected void btAcesso_Click(object sender, EventArgs e)
 {
     if (string.IsNullOrWhiteSpace(txtNumDoc.Text))
     {
         lblMsg.Text = "Erro: Digite o nº do documento.";
     }
     else
     {
         int  number;
         bool result = Int32.TryParse(txtNumDoc.Text, out number);
         if (result)
         {
             ClearTable();
             Tributario_bll tributario_Class = new Tributario_bll("GTIconnection");
             bool           bExiste          = tributario_Class.Existe_Documento_CIP(number);
             if (!bExiste)
             {
                 lblMsg.Text = "Erro: Documento inválido.";
             }
             else
             {
                 FillTable(number);
             }
         }
         else
         {
             lblMsg.Text = "Erro: Documento inválido.";
         }
     }
 }