private void LoadCourses(int deptId)
        {
            try
            {
                List <CourseViewModel> data = deptId == 0 ?  _courseRepo.GetAllCourses() : _courseRepo.GetAllDepartmentCourses(deptId);

                if (data != null)
                {
                    grdData.DataSource = data;
                    if (grdData.Rows.Count > 0)
                    {
                        grdData.Columns["Id"].Visible = false;
                    }
                    else
                    {
                        //var dt = new DataTable();
                        //grdData.Columns.Clear();
                        //dt.Columns.Add("Message", typeof(string));
                        //dt.Rows.Add("No items found");
                        //grdData.DataSource = dt;
                        // MessageBox.Show(this, "No record found", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    }

                    repData = data.ConvertToDataTable();  //save records in datatable for searching, export etc
                    Base.ResizeGrid(ref grdData);
                }
            }
            catch (Exception e)
            {
                MessageBox.Show(this, e.Message, "Error occured", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }