void RefreshViewCourse(CE_HR_Train_PlanType planType, int yearValue, string planBillNo) { List <View_HR_Train_PlanCollect> lstCollect = _ServiceCollect.GetCourseInfo(planType, yearValue, planBillNo); dgv_Course.DataSource = new BindingCollection <View_HR_Train_PlanCollect>(lstCollect); userControl_Course.Init(this.dgv_Course, this.dgv_Course.Name, null); }
public List <View_HR_Train_PlanCollect> GetCourseInfo(CE_HR_Train_PlanType planType, int yearValue, string planBillNo) { DepotManagementDataContext ctx = CommentParameter.DepotDataContext; var varData = from a in ctx.View_HR_Train_PlanCollect where a.计划类型 == planType.ToString() && a.年份 == yearValue select a; if (planType == CE_HR_Train_PlanType.临时培训计划) { varData = from a in varData where a.计划单号 == planBillNo select a; } return(varData.ToList()); }