Пример #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");