예제 #1
0
        public static MStatus Obter()
        {
            MStatus retorno = null;

            if (Conexao.Abrir())
            {
                SqlCommand command = new SqlCommand
                {
                    Connection  = Conexao.Connection,
                    CommandText = "SELECT DB_NAME() AS Nome"
                };

                SqlDataReader reader = command.ExecuteReader();
                if (reader.Read())
                {
                    retorno = new MStatus();

                    retorno.NomeBanco = reader["Nome"].ToString();
                }

                reader.Close();
                Conexao.Fechar();
            }
            return(retorno);
        }
예제 #2
0
 private void cmbBoxGender_KeyPress(object sender, KeyPressEventArgs e)
 {
     if (e.KeyChar == 13)
     {
         MStatus.Focus();
         e.Handled = true;
     }
     else
     {
         e.Handled = false;
     }
 }
예제 #3
0
 public static async Task Send(this IBot bot, MStatus msg) => await _Send(bot, msg, "status");