private void dgv_Course_CellEnter(object sender, DataGridViewCellEventArgs e) { if (dgv_Course.CurrentRow == null) { return; } txtAssess.Text = dgv_Course.CurrentRow.Cells["评估方式"].Value.ToString(); txtCourse.Text = dgv_Course.CurrentRow.Cells["课程名"].Value.ToString(); txtCourse.Tag = Convert.ToInt32(dgv_Course.CurrentRow.Cells["课程ID"].Value); txtLecturer.Text = dgv_Course.CurrentRow.Cells["推荐讲师"].Value.ToString(); cmbMonth.Text = GlobalObject.GeneralFunction.ValueConvertToEnum <CE_MonthValue>(Convert.ToInt32(dgv_Course.CurrentRow.Cells["月份"].Value)).ToString(); txtType.Text = dgv_Course.CurrentRow.Cells["课程类型"].Value.ToString(); numClassHour.Value = Convert.ToDecimal(dgv_Course.CurrentRow.Cells["预计课时"].Value); numFund.Value = Convert.ToDecimal(dgv_Course.CurrentRow.Cells["预计经费"].Value); chbIsOutSide.Checked = Convert.ToBoolean(dgv_Course.CurrentRow.Cells["外训"].Value); DataTable tempTable = _ServiceBasicInfo.GetPostInfo(Convert.ToInt32(txtCourse.Tag)); List <string> lstName = DataSetHelper.ColumnsToList(tempTable, "岗位名称"); txtPost.Text = ""; foreach (string item in lstName) { txtPost.Text += item + ","; } int courseID = Convert.ToInt32(txtCourse.Tag); Guid guid = new Guid(dgv_Course.CurrentRow.Cells["ID"].Value.ToString()); List <View_HR_Train_PlanUser> lstCheck = (from a in _ListPlanUser where a.PlanCourseID == guid select a).ToList(); List <View_HR_Train_PlanUser> lstSource = _ServiceSurvey.GetPlanUserInfoAll(guid, courseID); dgv_User.DataSource = new BindingCollection <View_HR_Train_PlanUser>(lstSource); foreach (DataGridViewRow dgvr in dgv_User.Rows) { dgvr.Cells["选"].Value = false; foreach (View_HR_Train_PlanUser user in lstCheck) { if (dgvr.Cells["员工编号"].Value.ToString() == user.员工编号) { dgvr.Cells["选"].Value = true; } } } _CourseGuid = dgv_Course.CurrentRow.Cells["ID"].Value.ToString(); }
private void 课件题库上传_Load(object sender, EventArgs e) { txtCourseName.Text = _CourseInfo.CourseName; DataTable tempTable = _ServiceBasicInfo.GetPostInfo(_CourseInfo.ID); List <string> lstName = DataSetHelper.ColumnsToList(tempTable, "岗位名称"); foreach (string item in lstName) { txtPost.Text += item + ","; } numExtraction.Value = _CourseInfo.ExamExtractionRate == null ? 0 : (decimal)_CourseInfo.ExamExtractionRate; numPass.Value = _CourseInfo.ExamPassRate == null ? 0 : (decimal)_CourseInfo.ExamPassRate; dgv_Courseware.DataSource = _ServiceBasicInfo.GetTable_Ware(_CourseInfo.ID); dgv_QuestionBank.DataSource = new BindingCollection <View_HR_Train_QuestionBank>(_ServiceBasicInfo.GetListQuestionBank(_CourseInfo.ID)); }
private void txtCourse_OnCompleteSearch() { txtCourse.Text = txtCourse.DataResult["课程名"].ToString(); txtCourse.Tag = Convert.ToInt32(txtCourse.DataResult["课程ID"]); View_HR_Train_Course tempInfo = _ServiceBasicInfo.GetSingleCourseInfo(Convert.ToInt32(txtCourse.Tag)); txtLecturer.Text = tempInfo.推荐讲师; txtType.Text = tempInfo.课程类型; txtAssess.Text = tempInfo.评估方式; numClassHour.Value = (decimal)tempInfo.预计经费; numFund.Value = (decimal)tempInfo.预计课时; chbIsOutSide.Checked = (bool)tempInfo.外训; DataTable tempTable = _ServiceBasicInfo.GetPostInfo(Convert.ToInt32(txtCourse.Tag)); List <string> lstName = DataSetHelper.ColumnsToList(tempTable, "岗位名称"); txtPost.Text = ""; foreach (string item in lstName) { txtPost.Text += item + ","; } }
void RefreshGrid_AssessType() { dgv_AssessType.DataSource = _ServiceBasicInfo.GetTable <HR_Train_AssessType>(); cmbAssess.DataSource = DataSetHelper.ColumnsToList(_ServiceBasicInfo.GetTable <HR_Train_AssessType>(), "方式名称"); }
void RefreshGrid_CourseType() { dgv_CourseType.DataSource = _ServiceBasicInfo.GetTable <HR_Train_CourseType>(); cmbType.DataSource = DataSetHelper.ColumnsToList(_ServiceBasicInfo.GetTable <HR_Train_CourseType>(), "类型名称"); }