Beispiel #1
0
        public string idDichVu()
        {
            DichVuBUS        dv    = new DichVuBUS();
            List <DichVuDTO> _list = dv.LayDanhSachDichVu();
            int idDichVu           = 0;

            if (_list.Count != 0)
            {
                idDichVu = Int32.Parse(_list[_list.Count - 1].IdDichVu.ToString()) + 1;
            }
            return(idDichVu.ToString());
        }
Beispiel #2
0
        private void HienthiDichvu()
        {
            DichVuBUS dichVuBUS = new DichVuBUS();

            if (rbLoai.Checked)
            {
                gridDV.DataSource              = dichVuBUS.LayDanhSachDichVuTheoLoai(int.Parse(cbmLoai.SelectedValue.ToString()));
                gridDV.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.AllCells;
                gridDV.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                gridDV.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(206, 187, 214);
                gridDV.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            }
            else
            {
                gridDV.DataSource              = dichVuBUS.LayDanhSachDichVu();
                gridDV.AutoSizeColumnsMode     = DataGridViewAutoSizeColumnsMode.AllCells;
                gridDV.Columns[1].AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill;
                gridDV.AlternatingRowsDefaultCellStyle.BackColor = Color.FromArgb(206, 187, 214);
                gridDV.AutoSizeRowsMode = DataGridViewAutoSizeRowsMode.AllCells;
            }
        }