Exemplo n.º 1
0
        private bool checkLoginExist()
        {
            bool result = false;

            if (!userDefaulLogin.Equals(txtLogin.Text))
            {
                SqlConnection conn = DBUtils.GetDBConnection();
                conn.Open();
                SqlCommand    cmd;
                SqlDataReader reader;
                String        sql = "";

                sql = "Select * from user_table where login='******';";

                cmd = new SqlCommand(sql, conn);

                reader = cmd.ExecuteReader();

                result = reader.HasRows;
                cmd.Dispose();
                conn.Close();
            }
            return(result);
        }
Exemplo n.º 2
0
 public ManageRooms()
 {
     InitializeComponent();
     conn = DBUtils.GetDBConnection();
     dropFields.selectedIndex = 0;
 }