예제 #1
0
        public Category(int id)
        {
            InitializeComponent();
            this.CarModel = new CarModel();

            DataSet dillers = CarModel.GetAllByDillerId(id);

            foreach (DataRow model in dillers.Tables[0].Rows)
            {
                Card Card = new Card();
                Card.AddName((string)model["name"]);
                Card.AddPrice(Convert.ToString(model["price"]));
                Card.AddImage((string)model["image"]);
                Card.AddBtn(Convert.ToInt32(model["Id"]));

                Card.MakeCard(Root);
            }
        }