Пример #1
0
        void LoadDetail()
        {
            var NVID = (int?)gvNhanVien.GetFocusedRowCellValue("ID");

            if (NVID == null)
            {
                gcLichSuDiLam.DataSource    = null;
                gcLichSuTraLuong.DataSource = null;
            }
            else
            {
                switch (xtraTabControl1.SelectedTabPageIndex)
                {
                case 0:
                    gcLichSuDiLam.DataSource = db.LichSuDiLam_Select(NVID);
                    break;

                case 1:
                    gcLichSuTraLuong.DataSource = db.LichSuTamUng_Select(NVID);
                    break;

                case 2:
                    gcLSTL.DataSource = db.LichSuTraLuong_Select(NVID);
                    break;

                default:
                    break;
                }
            }
        }