Beispiel #1
0
        protected void rptProcessDetail_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            DataRowView     l_drvRowItem  = null;
            M_LetterReceive l_objWorkItem = null;

            if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
            {
                UC_Step l_objStep = (UC_Step)e.Item.FindControl("ucStep");
                l_drvRowItem             = e.Item.DataItem as DataRowView;
                l_objWorkItem            = XmlUtility.DeSerializeXml <B_LetterReceive>(l_drvRowItem["FormsData"].ToString());
                l_objStep.Participant    = l_drvRowItem["ReceiveUserID"].ToString() + "(" + l_drvRowItem["ReceiveUserName"].ToString() + ")";
                l_objStep.m_strStepName  = l_drvRowItem["StepName"].ToString();
                l_objStep.SubmitDataTime = l_drvRowItem["SubmitDate"].ToString();
                l_objStep.SubmitAction   = l_drvRowItem["SubmitAction"].ToString();
                l_objStep.IsNoPrompt();
                switch (l_objStep.m_strStepName)
                {
                //步骤名称-承办
                case ProcessConstString.StepName.LetterReceiveStepName.STEP_CHECK:
                    l_objStep.Comment = l_objWorkItem.NiBanComment;
                    break;

                //步骤名称-领导批示
                case ProcessConstString.StepName.LetterReceiveStepName.STEP_INSTRUCTION:
                    l_objStep.Comment = l_objWorkItem.LS_Comment;
                    break;

                //步骤名称-政工办批阅
                case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_DIRECTOR:
                //步骤名称-团委书记批阅
                case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_CHIEF:
                //步骤名称-工会副主席拟办
                case ProcessConstString.StepName.LetterReceiveStepName.STEP_SECTION_MEMBER:
                    l_objStep.Comment = l_objWorkItem.UnderTake_Comment;
                    break;

                default:
                    break;
                }

                //附件信息
                if (l_objWorkItem.FileList.Count > 0)
                {
                    l_objStep.Attachment.UCIsEditable = false;
                    ucAttachment.UCWorkItemID         = l_objWorkItem.WorkItemID;
                    //ucAttachment.UCTBID = l_objWorkItem.;
                    l_objStep.Attachment.UCProcessID    = l_drvRowItem["ProcessID"].ToString();
                    l_objStep.Attachment.UCTemplateName = m_strProcessTemplate;
                    l_objStep.Attachment.UCDataList     = l_objWorkItem.FileList;
                }
                else
                {
                    l_objStep.HiddenAttach();
                }
            }
        }
        protected void rptProcessDetail_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)
        {
            DataRowView l_drvRowItem = null;

            if (e.Item.ItemType == System.Web.UI.WebControls.ListItemType.Item || e.Item.ItemType == System.Web.UI.WebControls.ListItemType.AlternatingItem)
            {
                UC_Step l_objStep = (UC_Step)e.Item.FindControl("ucStep");
                l_drvRowItem = e.Item.DataItem as DataRowView;

                EntityBase entity = null;
                //entity.file

                l_objStep.Participant    = l_drvRowItem["ReceiveUserID"].ToString() + "(" + l_drvRowItem["ReceiveUserName"].ToString() + ")";
                l_objStep.m_strStepName  = l_drvRowItem["StepName"].ToString();
                l_objStep.SubmitDataTime = l_drvRowItem["SubmitDate"].ToString();
                l_objStep.SubmitAction   = l_drvRowItem["SubmitAction"].ToString();

                switch (ProcessTemplate)
                {
                //case ConstString.ProcessTemplate.TRADE_UNION_RECEIVE:
                //    l_objWorkItem = XmlUtility.DeSerializeXml<B_GHS_WorkItems>(l_drvRowItem["FormsData"].ToString());
                //    break;
                //case ConstString.ProcessTemplate.PARTY_DISCIPLINE_RECEIVE:
                //    l_objWorkItem = XmlUtility.DeSerializeXml<B_DJS_WorkItems>(l_drvRowItem["FormsData"].ToString());
                //    break;
                //case ConstString.ProcessTemplate.YOUTH_LEAGUE_RECEIVE:
                //    l_objWorkItem = XmlUtility.DeSerializeXml<B_TWS_WorkItems>(l_drvRowItem["FormsData"].ToString());
                //    break;
                case ProcessConstString.TemplateName.COMPANY_RECEIVE:
                    B_GS_WorkItems l_objWorkItem = XmlUtility.DeSerializeXml <B_GS_WorkItems>(l_drvRowItem["FormsData"].ToString());
                    entity           = l_objWorkItem;
                    l_objStep.Prompt = l_objWorkItem.PromptEdit;
                    switch (l_objStep.m_strStepName)
                    {
                    //步骤名称-承办
                    case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_DIRECTOR:
                    case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_CHIEF:
                    case ProcessConstString.StepName.ReceiveStepName.STEP_SECTION_MEMBER:
                        l_objStep.Comment = l_objWorkItem.UnderTake_Comment;
                        break;

                    //步骤名称-领导批示
                    case ProcessConstString.StepName.ReceiveStepName.STEP_INSTRUCTION:
                        l_objStep.Comment = l_objWorkItem.LS_Comment;
                        break;

                    case ProcessConstString.StepName.ReceiveStepName.STEP_OFFICE:
                        l_objStep.Comment = l_objWorkItem.Officer_Comment;
                        break;

                    default:
                        break;
                    }
                    break;
                }

                //l_objStep.Prompt = l_drvRowItem["Prompt"].ToString();

                //附件信息
                if (entity != null && entity.FileList.Count > 0)
                {
                    l_objStep.Attachment.UCProcessID    = l_drvRowItem["ProcessID"].ToString();
                    l_objStep.Attachment.UCTemplateName = ProcessTemplate;
                    l_objStep.Attachment.UCDataList     = entity.FileList;
                }
                else
                {
                    l_objStep.HiddenAttach();
                }
            }
        }