using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace HRManagerSystem.Bll
{
    class Training
    {
        DataDataContext ddt = new DataDataContext();
        /// <summary>
        /// 刷新数据
        /// </summary>
        /// <param name="dg"></param>
        public void Reflush(DataGridView dg)
        {
            var result = ddt.T_Trainings.Join(ddt.T_StaffRecords, id => id.Staff_ID, staid => staid.Staff_ID, (train1, staff) => new { train1.Training_ID, staff.Staff_Name, train1.Training_Content, train1.Training_Grade, train1.Training_Address, train1.Training_StartTime, train1.Training_EndTime });
            dg.DataSource = result;
        }
    }
}
