public DataGridViewComboBoxColumn init_createColumn(subExtra extra) { DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn(); setComboBoxColumnStyle(column); column.HeaderText = extra.name; column.Name = extra.UUID; column.ContextMenuStrip = HKMenuStrip.createRightMenu( new HKMenuStrip.ItemStruct("修改考勤记录标题", modifyExtraTitle, column), new HKMenuStrip.ItemStruct("删除该列考勤记录", confirmToExtraDelete, column)); setComboBoxColumnContent(column, extra); return(column); }
public DataGridViewComboBoxColumn init_createColumn(SubAttandance subAtt) { Model.Course course = courseRef; string title = subAtt.date.ToString("m"); DataGridViewComboBoxColumn column = new DataGridViewComboBoxColumn(); setComboBoxColumnStyle(column); column.HeaderText = title; column.Name = subAtt.UUID; column.ContextMenuStrip = HKMenuStrip.createRightMenu( new HKMenuStrip.ItemStruct("删除该列考勤记录", confirmToAttandaceDelete, column)); foreach (Record record in course.getAllRecords()) { column.Items.Add(record.recordString()); } return(column); }