Exemplo n.º 1
0
        public List <GoiDichVuDTO> DanhSachGoiDichVu()
        {
            List <GoiDichVuDTO> list = new List <GoiDichVuDTO>();

            string    query = "select * from GoiDichVu";
            DataTable data  = DataProvider.Instance.ExcuteQuery(query);

            foreach (DataRow item in data.Rows)
            {
                GoiDichVuDTO goidichvu = new GoiDichVuDTO(item);
                list.Add(goidichvu);
            }

            return(list);
        }
Exemplo n.º 2
0
        private void cbGoiDichVu_SelectedIndexChanged(object sender, EventArgs e)
        {
            int id = 0;

            ComboBox cb = sender as ComboBox;

            if (cb.SelectedItem == null)
            {
                return;
            }

            GoiDichVuDTO selected = cb.SelectedItem as GoiDichVuDTO;

            id = selected.IDGoiDichVu;

            HienThiDichVuTheoIDGoiDichVu(id);
        }