///// <summary>
        ///// 设置控件状态为不可用(暂未使用)
        ///// </summary>
        //public void SetDisEnable()
        //{
        //    for (int i = 0; i < pnlCountSignList.Controls.Count; i++)
        //    {
        //        (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as WebControl).Enabled = false;
        //    }
        //}

        /// <summary>
        /// 调用方需要调用 得到List
        /// </summary>
        /// <returns></returns>
        public List <M_WorkRelation.DeptSign> UCGetHQList()
        {
            UCHQList = new List <M_WorkRelation.DeptSign>();
            M_WorkRelation.DeptSign info = new M_WorkRelation.DeptSign();

            for (int i = 0; i < pnlCountSignList.Controls.Count; i++)
            {
                info = new M_WorkRelation.DeptSign();
                if ((this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedValue != "")
                {
                    info.TBID       = (this.pnlCountSignList.Controls[i].FindControl("lblTBID") as Label).Text;                           //主键ID
                    info.DeptID     = (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedValue;       //部门ID
                    info.DeptName   = (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedItem.Text;   //部门名称
                    info.ID         = (this.pnlCountSignList.Controls[i].FindControl("lblUserID") as Label).Text;                         //会签人帐号
                    info.Name       = (this.pnlCountSignList.Controls[i].FindControl("lblUserName") as Label).Text;                       //会签人姓名
                    info.IsAgree    = (this.pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label).Text;                         //是否同意
                    info.SubmitDate = SysConvert.ToDateTime((this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label).ToolTip); //会签日期
                    info.Comment    = (this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label).ToolTip;                     //意见
                    //info.DealDate = SysConvert.ToDateTime((this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label).Text); //落实日期
                    //info.IsExclude = (this.pnlCountSignList.Controls[i].FindControl("cb") as FSCheckBox).Checked ? true : false;//是否进行会签
                    info.IsExclude = false;

                    Repeater rptDetialInfo = this.pnlCountSignList.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID

                    //List<M_WorkRelation.DetailInfo> detailInfoList = new List<M_WorkRelation.DetailInfo>();

                    //foreach (RepeaterItem itm in rptDetialInfo.Items)
                    //{
                    //    B_WorkRelation.DetailInfo detailInfo = new B_WorkRelation.DetailInfo();
                    //    //Label lblDealCondition = itm.FindControl("lblDealCondition") as Label;
                    //    Label lblContent = itm.FindControl("lblContent") as Label;
                    //    detailInfo.Comment = lblContent.Text;
                    //    //detailInfo.DealCondition = lblDealCondition.Text;
                    //    detailInfoList.Add(detailInfo);
                    //}

                    //info.DetailInfoList = detailInfoList;//意见

                    UCHQList.Add(info);
                }
            }
            return(UCHQList);
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void LoadBindData()
        {
            if (UCHQList.Count > 0)
            {
                M_WorkRelation.DeptSign info = new M_WorkRelation.DeptSign();
                for (int i = 0; i < UCHQList.Count; i++)
                {
                    info = (M_WorkRelation.DeptSign)UCHQList[i];
                    Count++;
                    LoadUserControl(Count, false);

                    //TBID
                    Label lblTBID = this.pnlCountSignList.Controls[i].FindControl("lblTBID") as Label;
                    lblTBID.Text = info.TBID;

                    //部门ID
                    DropDownList ddlSignDept = pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList;

                    FormsMethod.SelectedDropDownList(ddlSignDept, info.DeptID, info.DeptName);

                    //会签人ID
                    Label lblUserID = this.pnlCountSignList.Controls[i].FindControl("lblUserID") as Label;
                    lblUserID.Text = info.ID;

                    //会签人
                    Label lblUserName = this.pnlCountSignList.Controls[i].FindControl("lblUserName") as Label;
                    lblUserName.Text = info.Name;

                    //是否同意
                    Label lblTongYi = this.pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label;
                    lblTongYi.Text = info.IsAgree;

                    if (!String.IsNullOrEmpty(info.IsAgree))
                    {
                        ddlSignDept.Enabled = false;
                        ddlSignDept.CssClass = "dropdownlist_blue";
                        CheckBox cb = this.pnlCountSignList.Controls[i].FindControl("cb") as CheckBox;
                        if (UCIsAllowDel && UCIsDisEnable == false)
                        {
                            cb.Enabled = true;
                            cb.Checked = info.IsExclude;
                        }
                        else
                        {
                            cb.Enabled = false;
                            cb.Checked = info.IsExclude;
                        }
                    }

                    //会签日期
                    Label lblDate = this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label;
                    if (info.SubmitDate != DateTime.MinValue)
                    {
                        lblDate.Text = info.SubmitDate.ToString(ConstString.DateFormat.Normal);
                        lblDate.ToolTip = info.SubmitDate.ToString();
                    }
                    else
                    {
                        lblDate.Text = "";
                    }

                    //意见
                    Label lblYiJian = this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label;
                    lblYiJian.ToolTip = info.Comment;
                    lblYiJian.Text = SysString.TruncationString(info.Comment, 20);

                    //Repeater rptCurrentList = this.pnlCountSignList.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID
                    Label lblComment = this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label;
                    lblComment.Text = SysString.TruncationString(info.Comment, 20);

                    List<CYiJian> yiJianList = new List<CYiJian>();
                    foreach (B_WorkRelation.DetailInfo detailInfo in info.DetailInfoList)
                    {
                        CYiJian yiJian = new CYiJian();

                        yiJian.Content = detailInfo.Comment;
                        yiJian.DealCondition = detailInfo.DealCondition;
                        yiJian.FinishTime = info.SubmitDate.ToString();
                        yiJian.ID = info.TBID;
                        yiJian.ViewName = ProcessConstString.StepName.WorkRelationStepName.STEP_DEPTSIGN;
                        yiJian.UserName = info.Name;
                        yiJian.UserID = info.ID;
                        yiJianList.Add(yiJian);
                    }
                    //rptCurrentList.DataSource = yiJianList;
                    //rptCurrentList.DataBind();
                }
            }
            HiddenField hfDeptSignCount = this.Parent.Parent.FindControl("hfDeptSignCount") as HiddenField;
            if (hfDeptSignCount != null)
            { hfDeptSignCount.Value = UCHQList.Count.ToString(); }
        }
        ///// <summary>
        ///// 设置控件状态为不可用(暂未使用)
        ///// </summary>
        //public void SetDisEnable()
        //{
        //    for (int i = 0; i < pnlCountSignList.Controls.Count; i++)
        //    {
        //        (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as WebControl).Enabled = false;
        //    }
        //}
        /// <summary>
        /// 调用方需要调用 得到List
        /// </summary>
        /// <returns></returns>
        public List<M_WorkRelation.DeptSign> UCGetHQList()
        {
            UCHQList = new List<M_WorkRelation.DeptSign>();
            M_WorkRelation.DeptSign info = new M_WorkRelation.DeptSign();

            for (int i = 0; i < pnlCountSignList.Controls.Count; i++)
            {
                info = new M_WorkRelation.DeptSign();
                if ((this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedValue != "")
                {
                    info.TBID = (this.pnlCountSignList.Controls[i].FindControl("lblTBID") as Label).Text;//主键ID
                    info.DeptID = (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedValue; //部门ID
                    info.DeptName = (this.pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList).SelectedItem.Text;//部门名称
                    info.ID = (this.pnlCountSignList.Controls[i].FindControl("lblUserID") as Label).Text; //会签人帐号
                    info.Name = (this.pnlCountSignList.Controls[i].FindControl("lblUserName") as Label).Text;  //会签人姓名
                    info.IsAgree = (this.pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label).Text;  //是否同意
                    info.SubmitDate = SysConvert.ToDateTime((this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label).ToolTip); //会签日期
                    info.Comment = (this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label).ToolTip; //意见
                    //info.DealDate = SysConvert.ToDateTime((this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label).Text); //落实日期
                    //info.IsExclude = (this.pnlCountSignList.Controls[i].FindControl("cb") as FSCheckBox).Checked ? true : false;//是否进行会签
                    info.IsExclude = false;

                    Repeater rptDetialInfo = this.pnlCountSignList.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID

                    //List<M_WorkRelation.DetailInfo> detailInfoList = new List<M_WorkRelation.DetailInfo>();

                    //foreach (RepeaterItem itm in rptDetialInfo.Items)
                    //{
                    //    B_WorkRelation.DetailInfo detailInfo = new B_WorkRelation.DetailInfo();
                    //    //Label lblDealCondition = itm.FindControl("lblDealCondition") as Label;
                    //    Label lblContent = itm.FindControl("lblContent") as Label;
                    //    detailInfo.Comment = lblContent.Text;
                    //    //detailInfo.DealCondition = lblDealCondition.Text;
                    //    detailInfoList.Add(detailInfo);
                    //}

                    //info.DetailInfoList = detailInfoList;//意见

                    UCHQList.Add(info);
                }
            }
            return UCHQList;
        }
        /// <summary>
        /// 实体赋值
        /// </summary>
        /// <param name="IsSave"></param>
        /// <returns></returns>
        protected override EntityBase ControlToEntity(bool IsSave)
        {
            B_WorkRelation entity = base.EntityData != null ? base.EntityData as B_WorkRelation : new B_WorkRelation();

            #region 提示信息、意见
            if (!IsSave)
            {
                if (!string.IsNullOrEmpty(this.txtTianJia.Text))
                {
                    entity.MessageAdd = string.Empty;
                    entity.Message = this.txtTiShiXinXi.Text + (string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName) + "[" + DateTime.Now.ToString(ConstString.DateFormat.Long) + "]:(" + base.StepName + ")" + SysString.InputText(this.txtTianJia.Text) + "\n";
                }

                if (!string.IsNullOrEmpty(this.txtBanLiYiJian.Text))
                {
                    entity.BanLiYiJian = string.Empty;
                    entity.UndertakeCircs = this.txtChuLiYiJian.Text + (string.IsNullOrEmpty(entity.ReceiveUserName) ? CurrentUserInfo.DisplayName : entity.ReceiveUserName) + "[" + DateTime.Now.ToString(ConstString.DateFormat.Long) + "]:(" + base.StepName + ")" + SysString.InputText(this.txtBanLiYiJian.Text) + "\n";
                }
            }
            else
            {
                entity.Message = this.txtTiShiXinXi.Text;
                entity.MessageAdd = this.txtTianJia.Text;

                entity.UndertakeCircs = this.txtChuLiYiJian.Text;
                entity.BanLiYiJian = this.txtBanLiYiJian.Text;
            }
            #endregion

            //附件
            entity.FileList = ucAttachment.UCDataList;

            switch (base.StepName)
            {
                #region 拟稿
                case ProcessConstString.StepName.STEP_DRAFT:
                    //拟稿日期
                    entity.DraftDate = DateTime.Now;

                    //拟稿人
                    entity.Drafter = this.txtNiGaoRen.Text;
                    entity.NiGaoRenID = this.txtNiGaoRenID.Text;
                    entity.DrafterID = this.txtNiGaoRenID.Text;

                    //主送
                    if (this.ddlZhuSong.Items.Count > 0)
                    {
                        entity.MainSend = this.ddlZhuSong.SelectedItem.Text;
                        entity.MainSendDeptID = this.ddlZhuSong.SelectedValue;
                    }

                    //编制部门
                    if (this.ddlBianZhiBuMen.Items.Count > 0)
                    {
                        entity.Department = this.ddlBianZhiBuMen.SelectedItem.Text;
                        entity.BianZhiBuMenID = this.ddlBianZhiBuMen.SelectedValue;
                    }

                    //抄送
                    entity.CopySend = this.txtChaoSong.Text;
                    entity.ChaoSongBuMenID = this.txtChaoSongDeptIDs.Text;
                    entity.ChaoSongID = this.txtChaoSongIDs.Text;

                    //标题、主题
                    entity.DocumentTitle = SysString.InputText(this.txtZhuTi.Text);
                    //entity.Subject = this.txtZhuTi.Text;

                    //内容
                    //entity.Content = SysString.TextToHtmlCode(this.txtNeiRong.Text);
                    entity.Content = this.txtNeiRong.Text;

                    //部门负责人
                    if (this.ddlFuZeRen.Items.Count > 0)
                    {
                        entity.DeptPrincipal = this.ddlFuZeRen.SelectedItem.Text;
                        entity.FuZeRenID = this.ddlFuZeRen.SelectedValue;
                    }

                    //核稿人
                    entity.CheckDrafter = this.txtHeGaoRen.Text;
                    entity.HeGaoRenID = this.txtHeGaoRenID.Text;

                    //entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE;

                    //选择部门会签
                    //entity.DeptSignList = rptDept.Items.Count > 0 ? B_WorkRelation.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();
                    entity.DeptSignList = ucBuMenHuiQian.UCGetHQList();
                    break;
                #endregion

                #region 核稿
                case ProcessConstString.StepName.WorkRelationStepName.STEP_CHECK:
                    if (base.SubAction != ProcessConstString.SubmitAction.ACTION_DENY)
                    {
                        //主送
                        if (this.ddlZhuSong.Items.Count > 0)
                        {
                            entity.MainSend = this.ddlZhuSong.SelectedItem.Text;
                            entity.MainSendDeptID = this.ddlZhuSong.SelectedItem.Value;
                        }

                        //抄送
                        entity.CopySend = this.txtChaoSong.Text;
                        entity.ChaoSongBuMenID = this.txtChaoSongDeptIDs.Text;
                        entity.ChaoSongID = this.txtChaoSongIDs.Text;

                        //主题
                        entity.DocumentTitle = SysString.InputText(this.txtZhuTi.Text);

                        //内容
                        //entity.Content = SysString.TextToHtmlCode(this.txtNeiRong.Text);
                        entity.Content = this.txtNeiRong.Text;

                        //部门负责人
                        if (this.ddlFuZeRen.Items.Count > 0)
                        {
                            entity.DeptPrincipal = this.ddlFuZeRen.SelectedItem.Text;
                            entity.FuZeRenID = this.ddlFuZeRen.SelectedValue;
                        }

                        //选择部门会签
                        //entity.DeptSignList = rptDept.Items.Count > 0 ? B_WorkRelation.GetDeptSignList(rptDept, ucBuMenHuiQian.UCGetHQList()) : ucBuMenHuiQian.UCGetHQList();
                        entity.DeptSignList = ucBuMenHuiQian.UCGetHQList();
                    }
                    else
                    {
                        //退回,控制撤销按钮显示
                        entity.IsBack = true;
                    }

                    if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                    {
                        entity.TimesFlag = (int.Parse(string.IsNullOrEmpty(this.wfTimesFlag.Text) ? "1" : this.wfTimesFlag.Text) + 1).ToString();//次数标示
                    }
                    else
                    {
                        entity.TimesFlag = wfTimesFlag.Text;//次数标示
                    }
                    if (!IsSave)//renjinquan+ 核搞时间
                    {
                        entity.CheckDate = System.DateTime.Now;
                    }
                    entity.IsSignReject = ConstString.Miscellaneous.STATUS_FALSE;
                    break;
                #endregion

                #region 部门会签
                case ProcessConstString.StepName.WorkRelationStepName.STEP_DEPTSIGN:
                    M_WorkRelation.DeptSign deptSign = new M_WorkRelation.DeptSign();
                    string strAgreeOld = string.Empty;
                    if (OAConfig.GetConfig(ConstString.Config.Section.Start_WORKFLOW_AGENT, ConstString.Config.Key.IS_START) == "1" && wfReceiveUserID.Text != CurrentUserInfo.UserName)
                    {
                        foreach (M_WorkRelation.DeptSign signer in ucBuMenHuiQian.UCGetHQList())
                        {
                            if (signer.ID == wfReceiveUserID.Text && signer.IsExclude == false)
                            {
                                deptSign = signer;
                                strAgreeOld = deptSign.IsAgree;//记录上次的意见
                                break;
                            }
                        }
                    }
                    else
                    {
                        foreach (M_WorkRelation.DeptSign signer in ucBuMenHuiQian.UCGetHQList())
                        {
                            if (signer.ID == CurrentUserInfo.UserName && signer.IsExclude == false)
                            {
                                deptSign = signer;
                                strAgreeOld = deptSign.IsAgree;//记录上次的意见
                                break;
                            }
                        }
                    }

                    //非保存操作
                    if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                    {
                        deptSign.IsAgree = YiJianInfoList.Count == 0 ? ConstString.ProgramFile.PROGRAM_AGREE : ConstString.ProgramFile.PROGRAM_REJECT;
                        if (deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_REJECT || deptSign.SubmitDate == DateTime.MinValue || strAgreeOld == ConstString.ProgramFile.PROGRAM_REJECT)
                        {
                            deptSign.SubmitDate = DateTime.Now;
                        }
                        //判断是否会签退回(如果为同意,则需判断当前会签结果状态,否则为拒绝)
                        entity.IsSignReject = entity.IsSignReject == ConstString.Miscellaneous.STATUS_FALSE ? deptSign.IsAgree == ConstString.ProgramFile.PROGRAM_AGREE ?
                                                ConstString.Miscellaneous.STATUS_FALSE : ConstString.Miscellaneous.STATUS_TRUE : ConstString.Miscellaneous.STATUS_TRUE;

                        //在CommentList添加当前意见
                        entity.CommentList.Clear();
                        foreach (CYiJian objYj in YiJianInfoList)
                        {
                            objYj.FinishTime = DateTime.Now.ToString();
                        }
                        entity.CommentList = YiJianInfoList;
                    }

                    List<M_WorkRelation.DetailInfo> detailInfoList = new List<M_WorkRelation.DetailInfo>();
                    string strComment = string.Empty;//单条会签意见,用于表单列表显示

                    foreach (RepeaterItem item in this.rptComment.Items)
                    {
                        M_WorkRelation.DetailInfo detailInfo = new M_WorkRelation.DetailInfo();
                        Label lblContent = item.FindControl("lblContent") as Label;
                        detailInfo.Comment = lblContent.Text;

                        strComment = lblContent.Text;
                        detailInfoList.Add(detailInfo);
                    }

                    //deptSign.DealCondition = string.Empty;//清空处理情况
                    //deptSign.DealDate = DateTime.MinValue;//清空处理日期
                    deptSign.TBID = base.IdentityID.ToString();
                    deptSign.Comment = SysString.InputText(strComment);
                    deptSign.DetailInfoList = detailInfoList;//会签信息集合

                    entity.DeptSignList = B_WorkRelation.SetDeptSignList(deptSign, ucBuMenHuiQian.UCGetHQList());
                    break;
                #endregion

                #region 签发
                case ProcessConstString.StepName.WorkRelationStepName.STEP_SIGN:
                    if (base.SubAction != ProcessConstString.SubmitAction.ACTION_DENY)
                    {
                        //主送
                        if (this.ddlZhuSong.Items.Count > 0)
                        {
                            entity.MainSend = this.ddlZhuSong.SelectedItem.Text;
                            entity.MainSendDeptID = this.ddlZhuSong.SelectedItem.Value;
                        }

                        //抄送
                        entity.CopySend = this.txtChaoSong.Text;
                        entity.ChaoSongBuMenID = this.txtChaoSongDeptIDs.Text;
                        entity.ChaoSongID = this.txtChaoSongIDs.Text;

                        //主题
                        entity.DocumentTitle = SysString.InputText(this.txtZhuTi.Text);

                        //内容
                        //entity.Content = SysString.TextToHtmlCode(this.txtNeiRong.Text);
                        entity.Content = this.txtNeiRong.Text;

                        //签发日期
                        if (base.SubAction == ProcessConstString.SubmitAction.WorkRelationAction.ACTION_QF)
                        {
                            entity.ConfirmDate = DateTime.Now;
                        }

                        //部门领导(多人)
                        //string[] leaders = OAUser.GetDeptLeaderArray(entity.MainSendDeptID, 0);
                        string[] leaders = OAUser.GetUserByDeptPostArray(entity.MainSendDeptID, OUConstString.PostName.FUKEZHANG, true, true);
                        entity.ZhuSongID = leaders[0];

                        //编号
                        if (this.ddlBianZhiBuMen.Items.Count > 0)
                        {
                            entity.Number = WRRRNum.GetHNCode(ProcessConstString.TemplateName.AFFILIATION, this.ddlBianZhiBuMen.SelectedItem.Text);
                            //entity.No = entity.Number.Substring(entity.Number.Length - 5);
                            entity.DocumentNo = entity.Number;
                        }
                    }
                    else
                    {
                        entity.IsBack = true;
                    }

                    if (base.SubAction != ProcessConstString.SubmitAction.ACTION_SAVE_DRAFT)
                    {
                        entity.TimesFlag = (int.Parse(string.IsNullOrEmpty(this.wfTimesFlag.Text) ? "1" : this.wfTimesFlag.Text) + 1).ToString();//次数标示
                    }
                    else
                    {
                        entity.TimesFlag = wfTimesFlag.Text;//次数标示
                    }
                    break;
                #endregion

                #region 处室承办
                case ProcessConstString.StepName.WorkRelationStepName.STEP_DIRECTOR:
                    if (base.SubAction == ProcessConstString.SubmitAction.WorkRelationAction.ACTION_JBKS)
                    {
                        entity.ChengBanRenID = string.Empty;
                        entity.Contractor = string.Empty;
                        entity.MemberDate = DateTime.MinValue;

                        if (this.ddlKeShiLingDao.Items.Count > 0)
                        {
                            //科室
                            entity.KeShiID = this.ddlKeShiLingDao.SelectedValue;
                            entity.KeShi = this.ddlKeShiLingDao.SelectedItem.Text;

                            string[] id = OAUser.GetDeptManagerArray(this.ddlKeShiLingDao.SelectedValue, 0);
                            entity.KeShiLingDaoID = id[0].ToString();
                            entity.SectionLeader = id[1].ToString();
                        }
                    }

                    if (base.SubAction == ProcessConstString.SubmitAction.WorkRelationAction.ACTION_JBRY)
                    {
                        entity.KeShiID = string.Empty;
                        entity.KeShi = string.Empty;
                        entity.KeShiLingDaoID = string.Empty;
                        entity.SectionLeader = string.Empty;
                        entity.SectionDate = DateTime.MinValue;

                        if (this.ddlChengBanRen.Items.Count > 0)
                        {
                            entity.ChengBanRenID = this.ddlChengBanRen.SelectedValue;
                            entity.Contractor = this.ddlChengBanRen.SelectedItem.Text;
                        }
                    }

                    //部门领导
                    entity.BuMenLingDaoID = this.txtBuMenLingDaoID.Text;
                    entity.DeptLeader = this.txtBuMenLingDao.Text;

                    //承办日期
                    entity.DirectorDate = DateTime.Now;

                    //传阅
                    entity.ChuanYueRenYuan = this.txtChuanYueRenYuan.Text;
                    entity.ChuanYueRenYuanID = this.txtChuanYueRenYuanID.Text;
                    break;
                #endregion

                #region 科室承办
                case ProcessConstString.StepName.WorkRelationStepName.STEP_CHIEF:
                    //直接承办人
                    if (base.SubAction == ProcessConstString.SubmitAction.WorkRelationAction.ACTION_JBRY)
                    {
                        if (this.ddlChengBanRen.Items.Count > 0)
                        {
                            entity.ChengBanRenID = this.ddlChengBanRen.SelectedValue;
                            entity.Contractor = this.ddlChengBanRen.SelectedItem.Text;
                        }
                    }

                    entity.SectionDate = DateTime.Now;
                    entity.ChuanYueRenYuan = this.txtChuanYueRenYuan.Text;
                    entity.ChuanYueRenYuanID = this.txtChuanYueRenYuanID.Text;
                    break;
                #endregion

                #region 人员承办
                case ProcessConstString.StepName.WorkRelationStepName.STEP_MEMBER:
                    entity.MemberDate = DateTime.Now;
                    entity.ChuanYueRenYuan = this.txtChuanYueRenYuan.Text;
                    entity.ChuanYueRenYuanID = this.txtChuanYueRenYuanID.Text;
                    break;
                #endregion
            }
            return entity;
        }
        /// <summary>
        /// 绑定数据
        /// </summary>
        private void LoadBindData()
        {
            if (UCHQList.Count > 0)
            {
                M_WorkRelation.DeptSign info = new M_WorkRelation.DeptSign();
                for (int i = 0; i < UCHQList.Count; i++)
                {
                    info = (M_WorkRelation.DeptSign)UCHQList[i];
                    Count++;
                    LoadUserControl(Count, false);

                    //TBID
                    Label lblTBID = this.pnlCountSignList.Controls[i].FindControl("lblTBID") as Label;
                    lblTBID.Text = info.TBID;

                    //部门ID
                    DropDownList ddlSignDept = pnlCountSignList.Controls[i].FindControl("ddlSignDept") as DropDownList;

                    FormsMethod.SelectedDropDownList(ddlSignDept, info.DeptID, info.DeptName);

                    //会签人ID
                    Label lblUserID = this.pnlCountSignList.Controls[i].FindControl("lblUserID") as Label;
                    lblUserID.Text = info.ID;

                    //会签人
                    Label lblUserName = this.pnlCountSignList.Controls[i].FindControl("lblUserName") as Label;
                    lblUserName.Text = info.Name;

                    //是否同意
                    Label lblTongYi = this.pnlCountSignList.Controls[i].FindControl("lblTongYi") as Label;
                    lblTongYi.Text = info.IsAgree;

                    if (!String.IsNullOrEmpty(info.IsAgree))
                    {
                        ddlSignDept.Enabled  = false;
                        ddlSignDept.CssClass = "dropdownlist_blue";
                        CheckBox cb = this.pnlCountSignList.Controls[i].FindControl("cb") as CheckBox;
                        if (UCIsAllowDel && UCIsDisEnable == false)
                        {
                            cb.Enabled = true;
                            cb.Checked = info.IsExclude;
                        }
                        else
                        {
                            cb.Enabled = false;
                            cb.Checked = info.IsExclude;
                        }
                    }

                    //会签日期
                    Label lblDate = this.pnlCountSignList.Controls[i].FindControl("lblDate") as Label;
                    if (info.SubmitDate != DateTime.MinValue)
                    {
                        lblDate.Text    = info.SubmitDate.ToString(ConstString.DateFormat.Normal);
                        lblDate.ToolTip = info.SubmitDate.ToString();
                    }
                    else
                    {
                        lblDate.Text = "";
                    }

                    //意见
                    Label lblYiJian = this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label;
                    lblYiJian.ToolTip = info.Comment;
                    lblYiJian.Text    = SysString.TruncationString(info.Comment, 20);

                    //Repeater rptCurrentList = this.pnlCountSignList.Controls[i].FindControl("rptCurrentList") as Repeater;//主键ID
                    Label lblComment = this.pnlCountSignList.Controls[i].FindControl("lblComment") as Label;
                    lblComment.Text = SysString.TruncationString(info.Comment, 20);

                    List <CYiJian> yiJianList = new List <CYiJian>();
                    foreach (B_WorkRelation.DetailInfo detailInfo in info.DetailInfoList)
                    {
                        CYiJian yiJian = new CYiJian();

                        yiJian.Content       = detailInfo.Comment;
                        yiJian.DealCondition = detailInfo.DealCondition;
                        yiJian.FinishTime    = info.SubmitDate.ToString();
                        yiJian.ID            = info.TBID;
                        yiJian.ViewName      = ProcessConstString.StepName.WorkRelationStepName.STEP_DEPTSIGN;
                        yiJian.UserName      = info.Name;
                        yiJian.UserID        = info.ID;
                        yiJianList.Add(yiJian);
                    }
                    //rptCurrentList.DataSource = yiJianList;
                    //rptCurrentList.DataBind();
                }
            }
            HiddenField hfDeptSignCount = this.Parent.Parent.FindControl("hfDeptSignCount") as HiddenField;

            if (hfDeptSignCount != null)
            {
                hfDeptSignCount.Value = UCHQList.Count.ToString();
            }
        }