예제 #1
0
        public Helyek()
        {
            SqlConnection sc = new SqlConnection(DEFS.ConSTR);
            sc.Open();

            SqlCommand cmd = new SqlCommand();

            cmd.Connection = sc;

            cmd.CommandType = CommandType.Text;

            cmd.CommandText = "select h.HELY_ID, h.HELY_NEV, h.HELY_VAN_DESIGN from HELY h inner join ASZTAL a on h.HELY_ID = a.HELY_ID WHERE h.AKTIV = 1" +
                                " union " +
                                " select h.HELY_ID, h.HELY_NEV, h.HELY_VAN_DESIGN from HELY h where h.HELY_VAN_DESIGN = 0 and h.AKTIV = 1";

            SqlDataReader rdr = cmd.ExecuteReader();
            while (rdr.Read())
            {
                Hely t = new Hely((int)rdr["HELY_ID"],
                                (string)rdr["HELY_NEV"],
                                (int)rdr["HELY_VAN_DESIGN"]);
                lHelyek.Add(t);
            }
            rdr.Close();
            sc.Close();
        }
예제 #2
0
 public HelyButton(Hely aHely)
 {
     _Hely = aHely;
     Appearance = Appearance.Button;
     FlatStyle = FlatStyle.Flat;
     FlatAppearance.MouseOverBackColor = Color.Transparent;
     FlatAppearance.MouseDownBackColor = Color.Transparent;
     FlatAppearance.CheckedBackColor = Color.Transparent;
     FlatAppearance.BorderSize = 0;
     ImageAlign = ContentAlignment.MiddleCenter;
     BackColor = Color.Transparent;
 }