/// <summary> /// 通过任务信息初始化任务预览 /// </summary> /// <param name="customAppointment"></param> /// <param name="empId"></param> /// <param name="isOwner">是否负责人</param> public Frm我指派的任务预览(Frm任务S frm, CustomAppointment customAppointment, String delegateId) { InitializeComponent(); this.customAppointment = customAppointment; this.delegateId = delegateId; // 补充参与者信息 CustomAppointmentService.buildAssignee(customAppointment); CustomAppointmentService.taskRead(customAppointment); this.frm = frm; this.frm.RefrashGridcontrol(); this.initViewData(); // 初始化视图的值 this.getTaskAchievement(); this.getTaskWorkIntensity(); // 工作强度 // 任务分解一览 this.treeListTask.DataSource = CustomAppointmentService.getAllById(customAppointment.TaskId); this.gridControl2.DataSource = this.GetDataTable(); // 业务委托人 //显示的数据 this.comboBoxDelegate.DisplayMember = "Name"; //name为类A的字段名 //隐藏的数据(对于多个数据,可以用逗号隔开。例:id,name) this.comboBoxDelegate.ValueMember = "Id"; //id为类A的字段名(对于隐藏对个数据,把数据放到一个字段用逗号隔开) this.comboBoxDelegate.DataSource = EmpService.findAll(); }
private void Frm我指派的任务预览_Load(object sender, EventArgs e) { this.searchLookUpEdit1.Properties.DataSource = EmpService.findAll(); List <String> empIds = this.customAppointment.Assignee; List <EmpDto> empDtos = EmpService.findByIds(empIds); List <String> empNames = new List <string>(); foreach (EmpDto empDto in empDtos) { empNames.Add(empDto.Name); } this.searchLookUpEdit1.EditValue = string.Join(",", empNames); // name this.searchLookUpEdit1.ToolTip = string.Join(",", empIds == null ? new List <String>() : empIds); // id var v = this.luValues.Find(b => b.FindText == this.searchLookUpEdit1.Properties.View.FindFilterText); if (v == null) { v = new LookUpMultSelectValues(); v.FindText = this.searchLookUpEdit1.Properties.View.FindFilterText; v.SelectedValues = new List <string>(); v.SelectedDisplays = new List <string>(); this.luValues.Add(v); } }
/// <summary> /// 修改 /// </summary> /// <param name="id"></param> public Frm修改(Frm目录 frmbiao, String id) { this.initComponent(frmbiao); this.planId = id; this.initedit(); this.isModified = true; this.empDtos = EmpService.findAll(); }
private List <EmpDto> empDtos = new List <EmpDto>(); // 员工列表 /// <summary> /// 新增 /// </summary> /// <param name="frmbiao"></param> public Frm修改(Frm目录 frmbiao) { this.initComponent(frmbiao); this.isModified = false; this.empDtos = EmpService.findAll(); for (int i = 0; i < this.empDtos.Count; i++) { this.combo负责人.Properties.Items.Add(empDtos[i].Name.ToString()); // TODO } }
/// <summary> /// 废弃 /// </summary> /// <param name="frm"></param> public Frm新建申报(Frm目录 frm) { InitializeComponent(); this.form = frm; this.empDtos = EmpService.findAll(); for (int i = 0; i < this.empDtos.Count; i++) { this.combo负责人.Properties.Items.Add(empDtos[i].Name.ToString()); // TODO this.combo参与者.Properties.Items.Add(empDtos[i].Name.ToString()); // TODO } }
public Frm新建申报(String taskId, String taskTemplateId) { InitializeComponent(); this.taskId = taskId; this.taskTemplateId = taskTemplateId; this.empDtos = EmpService.findAll(); for (int i = 0; i < this.empDtos.Count; i++) { this.combo负责人.Properties.Items.Add(empDtos[i].Name.ToString()); // TODO this.combo参与者.Properties.Items.Add(empDtos[i].Name.ToString()); // TODO } this.treeList1.ExpandAll(); }
private void Frm新建任务_Load(object sender, EventArgs e) { // 日期 this.edtStartDate.Text = DateTime.Now.ToShortDateString(); this.edtEndDate.Text = DateTime.Now.ToShortDateString(); // 参与者 this.searchLookUpEdit1.Properties.DataSource = EmpService.findAll(); // 任务级别 this.repositoryItem任务级别.Items.Add("公司级任务"); this.repositoryItem任务级别.Items.Add("部门任务"); this.repositoryItem任务级别.Items.Add("业务组任务"); this.repositoryItem任务级别.Items.Add("个人任务"); // 业务委托人 //显示的数据 this.comboBoxDelegate.DisplayMember = "Name"; //name为类A的字段名 //隐藏的数据(对于多个数据,可以用逗号隔开。例:id,name) this.comboBoxDelegate.ValueMember = "Id"; //id为类A的字段名(对于隐藏对个数据,把数据放到一个字段用逗号隔开) this.comboBoxDelegate.DataSource = EmpService.findAll(); }
private List <DocFileDTO> docFileDTOs = new List <DocFileDTO>(); // 迭代中的文件,TODO,只有初始化 public Frm文档任务(String doc_template_id, String sprintId) { InitializeComponent(); // 变量赋值 this.sprintId = sprintId; this.doc_template_id = doc_template_id; this.doc_code = DocService.findDocCodeByDocTemplateId(doc_template_id).Replace("/", "_"); // 临时解决方案,把/换成_ this.wpd_file_name = this.doc_code; // TODO 走服务 // 根据文档模板id和迭代id查询文档结构化关系 this.documentTreeViews = DocService.findDocumentTreeViewByDocTemplateId(this.doc_template_id, this.sprintId); if (this.documentTreeViews.Count() == 0) { MessageBox.Show("模板不存在!", "ERROR"); this.Close(); } else { this.treeList员工.DataSource = EmpService.findAll(); this.treeList1.DataSource = this.documentTreeViews; // 数据绑定 this.docFileDTOs = DocService.findDocFileBySprintIdAndDocTemplateId(this.sprintId, this.doc_template_id); // 初始化迭代中的文件 } }
private Boolean isOwner; // 是否负责人 /// <summary> /// 通过任务信息初始化任务预览 /// </summary> /// <param name="customAppointment"></param> /// <param name="empId"></param> /// <param name="isOwner">是否负责人</param> public Frm我创建的任务预览(CustomAppointment customAppointment, String empId, Boolean isOwner) { InitializeComponent(); this.customAppointment = customAppointment; this.isOwner = isOwner; this.empId = empId; // 补充参与者信息 CustomAppointmentService.buildAssignee(customAppointment); this.initViewData(); // 初始化视图的值 if (this.customAppointment.OwnerId.Equals(empId)) { // 负责人视图 this.负责人视图(); } else { // 参与者视图,可以上传成果物 this.参与者视图(); } this.getTaskAchievement(); this.getTaskWorkIntensity(); // 工作强度 // 任务分解一览 this.treeListTask.DataSource = CustomAppointmentService.getAllById(customAppointment.TaskId); this.gridControl2.DataSource = this.GetDataTable(); // 业务委托人 //显示的数据 this.comboBoxDelegate.DisplayMember = "Name"; //name为类A的字段名 //隐藏的数据(对于多个数据,可以用逗号隔开。例:id,name) this.comboBoxDelegate.ValueMember = "Id"; //id为类A的字段名(对于隐藏对个数据,把数据放到一个字段用逗号隔开) this.comboBoxDelegate.DataSource = EmpService.findAll(); }
public void initComponent(Frm目录 frmbiao) { InitializeComponent(); this.frmbiao = frmbiao; this.empDtos = EmpService.findAll(); }