Пример #1
0
        /// <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();
        }
Пример #2
0
        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();
        }