コード例 #1
0
        /// <summary>
        /// 实体填充控件
        /// </summary>
        protected override void EntityToControl()
        {
            B_MergeReceiveBase l_objReceiveBase = null;

            //收文登记号
            this.RegisterID = Request.QueryString[ConstString.QueryString.REGISTER_ID];

            if (!String.IsNullOrEmpty(this.RegisterID))
            {
                B_ReceiveEdit l_BusReceiveEdit = new B_ReceiveEdit();
                l_BusReceiveEdit.ID = Convert.ToInt32(this.RegisterID);
                if (l_BusReceiveEdit == null)
                {
                    JScript.ShowMsgBox(this.Page, MsgType.VbCritical, "当前选择的收文登记信息不存在或者已经被删除,无法继续操作", "Container.aspx?ClassName=FS.ADIM.OA.WebUI.WorkflowMenu.ToDoTask.PG_WaitHandle");
                    return;
                }

                //附件列表
                this.ucAttachment.UCDataList = XmlUtility.DeSerializeXml <List <CFuJian> >(l_BusReceiveEdit.FileData);

                //收文号
                this.txtReceiveNo.Text = l_BusReceiveEdit.ReceiveNo;

                //收文日期
                this.txtReceiveDate.Text = l_BusReceiveEdit.ReceiveDate.ToString(ConstString.DateFormat.Normal);

                //原文号
                this.txtSendLetterNo.Text = l_BusReceiveEdit.SendLetterNo;

                //来文单位
                this.txtCommunicationUnit.Text = l_BusReceiveEdit.ReceiveUnit;

                //卷号
                this.txtPreVolumeNo.Text = l_BusReceiveEdit.PreVolumeNo;

                //文件名称
                this.txtDocumentTitle.Text = l_BusReceiveEdit.DocumentTitle;

                //紧急程度
                this.txtUrgentDegree.Text = l_BusReceiveEdit.UrgentDegree;

                //步骤名称
                base.StepName = ProcessConstString.StepName.ReceiveStepName.STEP_INITIAL;

                this.SubTemplateName = l_BusReceiveEdit.ProcessName;

                //党群工作处处长
                OAUser.GetUserByRole(this.ddlPoliticalOfficer, OUConstString.RoleName.PARTYS_DIRECTOR);
            }
            else
            {
                l_objReceiveBase = base.EntityData as B_MergeReceiveBase;

                this.SubTemplateName = l_objReceiveBase.TemplateName;

                this.RegisterID = l_objReceiveBase.RegisterID;

                //党群工作处处长
                OAUser.GetUserByRole(this.ddlPoliticalOfficer, OUConstString.RoleName.PARTYS_DIRECTOR);

                ddlPoliticalOfficer.SelectedValue = l_objReceiveBase.Officer;
                txtPoliticalOfficerComment.Text   = l_objReceiveBase.Officer_Comment;

                //附件列表
                this.ucAttachment.UCDataList = l_objReceiveBase.FileList;

                //收文号
                this.txtReceiveNo.Text = l_objReceiveBase.DocumentNo;

                //收文日期
                this.txtReceiveDate.Text = l_objReceiveBase.DocumentReceiveDate.ToString(ConstString.DateFormat.Normal);

                //原文号
                this.txtSendLetterNo.Text = l_objReceiveBase.SendNo;

                //来文单位
                this.txtCommunicationUnit.Text = l_objReceiveBase.CommunicationUnit;

                //卷号
                this.txtPreVolumeNo.Text = l_objReceiveBase.VolumeNo;

                //文件名称
                this.txtDocumentTitle.Text = l_objReceiveBase.DocumentTitle;

                //紧急程度
                this.txtUrgentDegree.Text = l_objReceiveBase.UrgentDegree;

                //发起人ID
                this.txtDrafter.Text = l_objReceiveBase.DrafterID;

                //发起日期
                this.txtDraftDate.Text = l_objReceiveBase.DraftDate.ToString();

                //公司领导
                this.ddlLeadShip.SelectedValue = l_objReceiveBase.LeaderShip;

                //公司批示意见
                this.txtLeadCommentView.Text = l_objReceiveBase.LS_Comment;
                if (base.StepName == ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION)
                {
                    this.txtLeadCommentEdit.Text = l_objReceiveBase.LS_Comment;
                }

                switch (base.StepName)
                {
                case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR:
                    //获取处室下属科室
                    OADept.GetChildDept(this.ddlUnderTakeSection, l_objReceiveBase.UnderTakeDept, 2);

                    //获取处室下属人员
                    OAUser.GetUserByDeptID(this.ddlUnderTakePeople, l_objReceiveBase.UnderTakeDept, -1);
                    break;

                case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF:
                    //获取科室下属人员
                    OAUser.GetUserByDeptID(this.ddlUnderTakePeople, l_objReceiveBase.UnderTakeChief, -1);
                    break;

                case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER:
                    break;
                }

                //承办部门
                this.txtUnderTakeDeptID.Text   = l_objReceiveBase.UnderTakeDept;
                this.txtUnderTakeDeptName.Text = l_objReceiveBase.UnderTakeDeptName;

                //承办科室
                this.ddlUnderTakeSection.SelectedValue = l_objReceiveBase.UnderTakeChief;

                //承办人员
                this.ddlUnderTakePeople.SelectedValue = l_objReceiveBase.UnderTakePeople;

                //承办意见
                this.txtUnderTakeCommentEdit.Text = l_objReceiveBase.UnderTake_Comment;
                this.txtCirculatePeopleName.Text  = l_objReceiveBase.CPeopleName;
                this.txtCirculatePeopleID.Text    = l_objReceiveBase.CPeopleID;
                this.txtCirculateDeptName.Text    = l_objReceiveBase.CDeptName;
                this.txtCirculateDeptID.Text      = l_objReceiveBase.CDeptID;

                //党群工作处处长处理后显示label形式的处长姓名与时间
                if (l_objReceiveBase.DraftDate == DateTime.MinValue)
                {
                    this.ddlPoliticalOfficer.Visible = false;
                    this.lbParty.Visible             = true;
                    this.lbParty.Text = l_objReceiveBase.Officer + strNewLine + l_objReceiveBase.Officer_Date;
                }

                //领导;批示处理后显示label形式的领导人姓名与时间
                if (l_objReceiveBase.LS_Date != "" && l_objReceiveBase.LS_Date != null)
                {
                    this.ddlLeadShip.Visible = false;
                    this.lbLeadShip.Visible  = true;
                    this.lbLeadShip.Text     = l_objReceiveBase.LeaderShipName + strNewLine + l_objReceiveBase.LS_Date;
                }

                //提示信息
                this.txtPrompt.Text = l_objReceiveBase.Prompt;
                if (l_objReceiveBase.IsFormSave)
                {
                    this.txtPromptEdit.Text = l_objReceiveBase.PromptEdit;
                }
            }
        }