/// <summary>
        /// Load danh sách các phòng ban
        /// </summary>
        /// <Modified>
        ///     Author      Date        Comments
        ///     TuanND    29/4/2008    Tạo mới
        /// </Modified>
        private void HienThiPhongBan()
        {
            TuDienPhong objPhong = new TuDienPhong();
            DataTable   tblPhong = objPhong.LayDanhSach();

            cbPhong.DataSource    = tblPhong;
            cbPhong.DisplayMember = "TenPhong";
            cbPhong.ValueMember   = "PhongID";
        }
Beispiel #2
0
        /// <summary>
        /// Hiển thị danh sách các phòng lên control gridview
        /// </summary>
        /// <Modified>
        ///     Author      Date        Comments
        ///     TuanND    31/01/2008    Tạo mới
        /// </Modified>
        public void LayDsPhong()
        {
            TuDienPhong objTuDienPhong = new TuDienPhong();
            DataTable   dtPhong        = objTuDienPhong.LayDanhSach();

            ThemSTT(dtPhong);
            dgrPhong.DataSource = dtPhong;
            if (dgrPhong.RowCount > 1)
            {
                txtPhong.Text = dgrPhong.Rows[0].Cells["TenPhong"].Value.ToString();
            }
        }
        /// <summary>
        /// Load danh sách các phòng ban
        /// </summary>
        /// <Modified>
        ///     Author      Date        Comments
        ///     Cuongdb    29/2/2008    Tạo mới
        /// </Modified>

        private void LoadPhongBan()
        {
            TuDienPhong objPhong = new TuDienPhong();
            DataTable   tblPhong = objPhong.LayDanhSach();
            DataRow     row      = tblPhong.NewRow();

            row["TenPhong"] = "Tất cả phòng ban";
            row["PhongID"]  = "0";
            tblPhong.Rows.InsertAt(row, 0);
            cbPhongBan.DisplayMember = "TenPhong";
            cbPhongBan.ValueMember   = "PhongID";
            cbPhongBan.DataSource    = tblPhong;
        }