Example #1
0
        /// <summary>
        /// 传阅部门和人员的方法
        /// </summary>
        /// <param name="p_strDeptIDS">部门ID</param>
        /// <param name="CType">传阅方式(0.所有人1.职位大于副处加负责人和部门领导2.根据角色 3.部门领导)</param>
        /// <param name="p_strRoleName">传阅的角色</param>
        /// <param name="p_strUserIDS">传阅人员ID</param>
        /// <param name="Type">1.被抄送1(表单上第一次抄送) 2.被抄送2(表单上追加分发) 3.继续传阅  4. 二次分发</param>
        /// <param name="p_blnIsAssign">是否重发true是,false否</param>
        /// <param name="p_strComment">意见</param>
        /// <param name="p_blnIsReDirect">是否跳转</param>
        /// <returns></returns>
        public void Circulate(String p_strDeptIDS, String CType, String p_strRoleName, String p_strUserIDS, String Type, Boolean p_blnIsAssign, String p_strComment, Boolean p_blnIsReDirect)
        {
            B_ToCirculate l_busCirculate = new B_ToCirculate();

            l_busCirculate.ToProcessID   = this.ProcessID;
            l_busCirculate.ToWorkItemID  = this.WorkItemID;
            l_busCirculate.YiJian        = p_strComment;
            l_busCirculate.IsAgain       = p_blnIsAssign;
            l_busCirculate.ToProcessType = this.TemplateName;
            l_busCirculate.Type          = Type;
            l_busCirculate.ToUserIDS     = p_strUserIDS;
            l_busCirculate.ToDeptIDS     = p_strDeptIDS;
            switch (CType)
            {
            case "0":
                l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.所有人;
                break;

            case "1":
                l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.职位大于副科加负责人和部门领导;
                break;

            case "2":
                l_busCirculate.ToCType    = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.根据角色;
                l_busCirculate.ToRoleName = p_strRoleName;
                break;

            case "3":
                l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.部门领导;
                break;
            }

            String info = l_busCirculate.ChuanYueToDB();

            if (p_blnIsReDirect)
            {
                this.ShowMsgBox(this.Page, MsgType.VbInformation, info, base.EntryAction);
            }
            else
            {
                JScript.Alert(info, true);
            }
        }
        /// <summary>
        /// 传阅部门和人员的方法
        /// </summary>
        /// <param name="p_strDeptIDS">部门ID</param>
        /// <param name="CType">传阅方式(0.所有人1.职位大于副处加负责人和部门领导2.根据角色 3.部门领导)</param>
        /// <param name="p_strRoleName">传阅的角色</param>
        /// <param name="p_strUserIDS">传阅人员ID</param>
        /// <param name="Type">1.被抄送1(表单上第一次抄送) 2.被抄送2(表单上追加分发) 3.继续传阅  4. 二次分发</param>
        /// <param name="p_blnIsAssign">是否重发true是,false否</param>
        /// <param name="p_strComment">意见</param>
        /// <param name="p_blnIsReDirect">是否跳转</param>
        /// <returns></returns>
        public void Circulate(String p_strDeptIDS, String CType, String p_strRoleName, String p_strUserIDS, String Type, Boolean p_blnIsAssign, String p_strComment, Boolean p_blnIsReDirect)
        {
            B_ToCirculate l_busCirculate = new B_ToCirculate();
            l_busCirculate.ToProcessID = this.ProcessID;
            l_busCirculate.ToWorkItemID = this.WorkItemID;
            l_busCirculate.YiJian = p_strComment;
            l_busCirculate.IsAgain = p_blnIsAssign;
            l_busCirculate.ToProcessType = this.TemplateName;
            l_busCirculate.Type = Type;
            l_busCirculate.ToUserIDS = p_strUserIDS;
            l_busCirculate.ToDeptIDS = p_strDeptIDS;
            switch (CType)
            {
                case "0":
                    l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.所有人;
                    break;
                case "1":
                    l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.职位大于副科加负责人和部门领导;
                    break;
                case "2":
                    l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.根据角色;
                    l_busCirculate.ToRoleName = p_strRoleName;
                    break;
                case "3":
                    l_busCirculate.ToCType = FS.ADIM.OA.BLL.Busi.Process.B_ToCirculate.CirculateType.部门领导;
                    break;
            }

            String info = l_busCirculate.ChuanYueToDB();

            if (p_blnIsReDirect)
            {
                this.ShowMsgBox(this.Page, MsgType.VbInformation, info, base.EntryAction);
            }
            else
            {
                JScript.Alert(info, true);
            }
        }
Example #3
0
 /// <summary>
 /// 分发 对与已经分发过的则不再分发
 /// </summary>
 /// <param name="yiFenFaUser">已分发人员</param>
 /// <returns></returns>
 public void DoCirculate(ref string sSuccesName, ref string sFailedName)
 {
     if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value) || !string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value))
     {
         string        id    = Request["CirculateID"] != null ? Request["CirculateID"].ToString() : "-1";
         string        sql   = string.Format(@"SELECT * FROM {0} WHERE ID={1}", TableName.GetCirculateTableName(UCProcessType), id);
         DataTable     dt    = Entity.RunQuery(sql);
         B_ToCirculate tocir = new B_ToCirculate();
         tocir.ToProcessID   = this.UCProcessID;
         tocir.ToWorkItemID  = this.UCWorkItemID;
         tocir.YiJian        = FormsMethod.GetPrompt(this.txtCommentView.Text, this.txtCommentEdit.Text);
         tocir.IsAgain       = false;
         tocir.ToProcessType = this.UCProcessType;
         tocir.ToUserIDS     = this.txtCirculatesIDs.Value;
         tocir.ToiLevelCode  = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["ID"].ToString() : "0";
         tocir.ToiLastLevel  = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["LevelCode"].ToString() : "";
         if (!string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value))
         {
             string strUserids = OAUser.GetUserByDeptPostArray(this.txtCirculatesDeptIDs.Value, OUConstString.PostName.FUKEZHANG, true, true)[0];
             if (string.IsNullOrEmpty(strUserids) == false && strUserids.Length > 0)
             {
                 strUserids = strUserids.Replace(";", ",");
             }
             if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value))
             {
                 tocir.ToUserIDS += "," + strUserids;
             }
             else
             {
                 tocir.ToUserIDS += strUserids;
             }
         }
         string info = tocir.ChuanYueToDB();
         sSuccesName = info;
     }
 }
 /// <summary>
 /// 分发 对与已经分发过的则不再分发
 /// </summary>
 /// <param name="yiFenFaUser">已分发人员</param>
 /// <returns></returns>
 public void DoCirculate(ref string sSuccesName, ref string sFailedName)
 {
     if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value) || !string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value))
     {
         string id = Request["CirculateID"] != null ? Request["CirculateID"].ToString() : "-1";
         string sql = string.Format(@"SELECT * FROM {0} WHERE ID={1}", TableName.GetCirculateTableName(UCProcessType), id);
         DataTable dt = Entity.RunQuery(sql);
         B_ToCirculate tocir = new B_ToCirculate();
         tocir.ToProcessID = this.UCProcessID;
         tocir.ToWorkItemID = this.UCWorkItemID;
         tocir.YiJian = FormsMethod.GetPrompt(this.txtCommentView.Text, this.txtCommentEdit.Text);
         tocir.IsAgain = false;
         tocir.ToProcessType = this.UCProcessType;
         tocir.ToUserIDS = this.txtCirculatesIDs.Value;
         tocir.ToiLevelCode = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["ID"].ToString() : "0";
         tocir.ToiLastLevel = dt != null && dt.Rows.Count > 0 ? dt.Rows[0]["LevelCode"].ToString() : "";
         if (!string.IsNullOrEmpty(this.txtCirculatesDeptIDs.Value))
         {
             string strUserids = OAUser.GetUserByDeptPostArray(this.txtCirculatesDeptIDs.Value, OUConstString.PostName.FUKEZHANG, true, true)[0];
             if (string.IsNullOrEmpty(strUserids) == false && strUserids.Length > 0)
             {
                 strUserids = strUserids.Replace(";", ",");
             }
             if (!string.IsNullOrEmpty(this.txtCirculatesIDs.Value))
             {
                 tocir.ToUserIDS += "," + strUserids;
             }
             else
             {
                 tocir.ToUserIDS += strUserids;
             }
         }
         string info = tocir.ChuanYueToDB();
         sSuccesName = info;
     }
 }
        protected void btnSecFF_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtProcessID.Text == string.Empty)
                {
                    JScript.Alert("只有已经启动的流程才能二次分发!");
                    return;
                }
                List<EntityBase> bworkitems = B_FormsData.GetEntities(this.txtProcessID.Text, "", ProcessConstString.TemplateName.LETTER_RECEIVE, "", true);
                B_LetterReceive NewEntity = new B_LetterReceive();
                B_LetterReceive bworkitem = bworkitems != null && bworkitems.Count > 0 ? bworkitems[0] as B_LetterReceive : new B_LetterReceive();

                NewEntity.ProcessID = this.txtProcessID.Text;

                NewEntity.WorkItemID = Guid.NewGuid().ToString("N");
                bworkitem.WorkItemID = NewEntity.WorkItemID;

                bworkitem.StepName = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF2;
                NewEntity.StepName = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF2;

                bworkitem.SubmitDate = System.DateTime.Now;
                NewEntity.SubmitDate = System.DateTime.Now;

                bworkitem.CommentList.Clear();

                bworkitem.UrgentDegree = this.ddlUrgentDegree.SelectedValue;
                NewEntity.UrgentDegree = this.ddlUrgentDegree.SelectedValue;

                bworkitem.DocumentNo = this.txtDocumentNo.Text;
                NewEntity.DocumentNo = this.txtDocumentNo.Text;

                bworkitem.ReceiptDate = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;
                NewEntity.ReceiptDate = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;

                bworkitem.FileEncoding = this.txtDocumentEncoding.Text;
                NewEntity.FileEncoding = this.txtDocumentEncoding.Text;

                bworkitem.CommunicationUnit = this.txtReceiveUnit.Text;
                NewEntity.CommunicationUnit = this.txtReceiveUnit.Text;

                bworkitem.DocumentTitle = this.txtDocumentTitle.Text;
                NewEntity.DocumentTitle = this.txtDocumentTitle.Text;

                bworkitem.Remarks = this.txtRemark.Text;
                NewEntity.Remarks = this.txtRemark.Text;

                bworkitem.FileList = this.ucAttachment.UCDataList;
                NewEntity.FileList = this.ucAttachment.UCDataList;

                bworkitem.ReceiveDateTime = DateTime.Now;
                NewEntity.ReceiveDateTime = DateTime.Now;

                bworkitem.ReceiveUserID = CurrentUserInfo.UserName;
                NewEntity.ReceiveUserID = CurrentUserInfo.UserName;

                bworkitem.ReceiveUserName = CurrentUserInfo.DisplayName;
                NewEntity.ReceiveUserName = CurrentUserInfo.DisplayName;
                NewEntity.D_StepStatus = bworkitem.D_StepStatus;
                NewEntity.ReceiptDate = bworkitem.ReceiptDate;
                NewEntity.Pages = bworkitem.Pages;
                NewEntity.ChuanYueLeader = bworkitem.ChuanYueLeader;
                NewEntity.AssistDept = bworkitem.AssistDept;
                NewEntity.AssistDeptName = bworkitem.AssistDeptName;
                NewEntity.ChuanYueLeader = bworkitem.ChuanYueLeader;
                NewEntity.ChuanYueDept = bworkitem.ChuanYueDept;
                NewEntity.LeaderShip = bworkitem.LeaderShip;
                NewEntity.LeaderShipName = bworkitem.LeaderShipName;
                NewEntity.LS_Comment = bworkitem.LS_Comment;
                NewEntity.UnderTakeID = bworkitem.UnderTakeID;
                NewEntity.UnderTake = bworkitem.UnderTake;
                NewEntity.UnderTake_Comment = bworkitem.UnderTake_Comment;
                NewEntity.UnderTakeLeaders = bworkitem.UnderTakeLeaders;
                NewEntity.NiBanRen = bworkitem.NiBanRen;
                NewEntity.NiBanRenName = bworkitem.NiBanRenName;
                NewEntity.NiBanComment = bworkitem.NiBanComment;
                NewEntity.Drafter = bworkitem.Drafter;
                NewEntity.DraftDate = bworkitem.DraftDate;
                NewEntity.RegisterID = bworkitem.RegisterID;
                NewEntity.Prompt = bworkitem.Prompt;
                NewEntity.ChuanYueDeptID = bworkitem.ChuanYueDeptID;
                NewEntity.HJPrompt = bworkitem.HJPrompt;
                NewEntity.ChuanYueLeaderID = bworkitem.ChuanYueLeaderID;
                NewEntity.AgentUserName = bworkitem.AgentUserName;
                NewEntity.AgentUserID = bworkitem.AgentUserID;

                NewEntity.FormsData = XmlUtility.SerializeXml(bworkitem as EntityBase);
                FormSave.SaveEntity(NewEntity, false);

                if (B_ProcessInstance.IsCompletedOrCancel(NewEntity.ProcessID))
                {
                    B_ProcessInstance.MoveToBakTable(NewEntity.WorkItemID, "T_OA_HS_WorkItems", "T_OA_HS_WorkItems_BAK");//在备份库中插入数据
                    B_ProcessInstance.UpdateRecordStatus(NewEntity.WorkItemID,2);//将现行库数据更新为不可用。
                }

                btnModify_Click(null, null);

                //string filedata = "<FileList />";
                //if (this.ucAttachment.UCDataList.Count > 0)
                //{
                //    string formdata = XmlUtility.SerializeXml<B_LetterReceive>(bworkitem);
                //    int iStartIndex = formdata.IndexOf("<FileList>");
                //    int iEndIndex = formdata.IndexOf("</FileList>");
                //    if (iEndIndex > iStartIndex)
                //    {
                //        filedata = formdata.Substring(iStartIndex, iEndIndex - iStartIndex);
                //        filedata += "</FileList>";
                //    }
                //}
                //FormsMethod.UpdateAssignFileData(bworkitem.ProcessID,ProcessConstString.TemplateName.LETTER_RECEIVE, "", filedata);
                List<EntityBase> bworkitemsAssign = B_FormsData.GetEntities(this.txtProcessID.Text, "", ProcessConstString.TemplateName.LETTER_RECEIVE, "", true, "'New','Assigned'");
                string strUpdatePeople = string.Empty;
                foreach (EntityBase entity in bworkitemsAssign)
                {
                    B_LetterReceive lentity = entity as B_LetterReceive;

                    lentity.SubmitDate = System.DateTime.Now;

                    lentity.UrgentDegree = this.ddlUrgentDegree.SelectedValue;

                    lentity.DocumentNo = this.txtDocumentNo.Text;

                    lentity.ReceiptDate = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;
                    lentity.FileEncoding = this.txtDocumentEncoding.Text;

                    lentity.CommunicationUnit = this.txtReceiveUnit.Text;

                    lentity.DocumentTitle = this.txtDocumentTitle.Text;

                    lentity.Remarks = this.txtRemark.Text;

                    lentity.FileList = this.ucAttachment.UCDataList;
                    FormSave.SaveEntity(lentity as EntityBase, true);
                    strUpdatePeople += lentity.ReceiveUserName + ",";
                }
                B_ToCirculate l_busCirculate = new B_ToCirculate();
                l_busCirculate.IsAgain = true;
                l_busCirculate.ToProcessType = ProcessConstString.TemplateName.LETTER_RECEIVE;
                l_busCirculate.ToProcessID = bworkitem.ProcessID;
                l_busCirculate.ToWorkItemID = bworkitem.WorkItemID;
                l_busCirculate.ToUserIDS = B_FormsData.GetProcessPeople("'Completed','Removed'", this.txtProcessID.Text, ";", true);
                string strInfo = string.Empty;
                if (l_busCirculate.ToUserIDS != string.Empty)
                {
                    strInfo = l_busCirculate.ChuanYueToDB();
                }
                strUpdatePeople=strUpdatePeople.Length>0?strUpdatePeople.Substring(0,strUpdatePeople.Length-1):"";
                strInfo = strInfo.Replace("传阅成功", "二次分发成功");
                strInfo += string.IsNullOrEmpty(strInfo) ? "" : "\\n";
                strInfo +=string.IsNullOrEmpty(strUpdatePeople) ? "" : ("("+strUpdatePeople + ")更新成功!");
                if (strInfo != string.Empty)
                {
                    JScript.Alert(strInfo);
                }
                else
                {
                    JScript.Alert("二次分发成功!无人员传阅和数据更新!");
                }
            }
            catch
            {
                JScript.Alert("二次分发失败!");
            }
        }
        protected void btnSecFF_Click(object sender, EventArgs e)
        {
            try
            {
                if (this.txtProcessID.Text == string.Empty)
                {
                    JScript.Alert("只有已经启动的流程才能二次分发!");
                    return;
                }
                List <EntityBase> bworkitems = B_FormsData.GetEntities(this.txtProcessID.Text, "", ProcessConstString.TemplateName.LETTER_RECEIVE, "", true);
                B_LetterReceive   NewEntity  = new B_LetterReceive();
                B_LetterReceive   bworkitem  = bworkitems != null && bworkitems.Count > 0 ? bworkitems[0] as B_LetterReceive : new B_LetterReceive();

                NewEntity.ProcessID = this.txtProcessID.Text;

                NewEntity.WorkItemID = Guid.NewGuid().ToString("N");
                bworkitem.WorkItemID = NewEntity.WorkItemID;

                bworkitem.StepName = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF2;
                NewEntity.StepName = ProcessConstString.SubmitAction.LetterReceiveAction.ACTION_FF2;

                bworkitem.SubmitDate = System.DateTime.Now;
                NewEntity.SubmitDate = System.DateTime.Now;

                bworkitem.CommentList.Clear();

                bworkitem.UrgentDegree = this.ddlUrgentDegree.SelectedValue;
                NewEntity.UrgentDegree = this.ddlUrgentDegree.SelectedValue;

                bworkitem.DocumentNo = this.txtDocumentNo.Text;
                NewEntity.DocumentNo = this.txtDocumentNo.Text;

                bworkitem.ReceiptDate = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;
                NewEntity.ReceiptDate = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;

                bworkitem.FileEncoding = this.txtDocumentEncoding.Text;
                NewEntity.FileEncoding = this.txtDocumentEncoding.Text;

                bworkitem.CommunicationUnit = this.txtReceiveUnit.Text;
                NewEntity.CommunicationUnit = this.txtReceiveUnit.Text;

                bworkitem.DocumentTitle = this.txtDocumentTitle.Text;
                NewEntity.DocumentTitle = this.txtDocumentTitle.Text;

                bworkitem.Remarks = this.txtRemark.Text;
                NewEntity.Remarks = this.txtRemark.Text;

                bworkitem.FileList = this.ucAttachment.UCDataList;
                NewEntity.FileList = this.ucAttachment.UCDataList;

                bworkitem.ReceiveDateTime = DateTime.Now;
                NewEntity.ReceiveDateTime = DateTime.Now;

                bworkitem.ReceiveUserID = CurrentUserInfo.UserName;
                NewEntity.ReceiveUserID = CurrentUserInfo.UserName;

                bworkitem.ReceiveUserName   = CurrentUserInfo.DisplayName;
                NewEntity.ReceiveUserName   = CurrentUserInfo.DisplayName;
                NewEntity.D_StepStatus      = bworkitem.D_StepStatus;
                NewEntity.ReceiptDate       = bworkitem.ReceiptDate;
                NewEntity.Pages             = bworkitem.Pages;
                NewEntity.ChuanYueLeader    = bworkitem.ChuanYueLeader;
                NewEntity.AssistDept        = bworkitem.AssistDept;
                NewEntity.AssistDeptName    = bworkitem.AssistDeptName;
                NewEntity.ChuanYueLeader    = bworkitem.ChuanYueLeader;
                NewEntity.ChuanYueDept      = bworkitem.ChuanYueDept;
                NewEntity.LeaderShip        = bworkitem.LeaderShip;
                NewEntity.LeaderShipName    = bworkitem.LeaderShipName;
                NewEntity.LS_Comment        = bworkitem.LS_Comment;
                NewEntity.UnderTakeID       = bworkitem.UnderTakeID;
                NewEntity.UnderTake         = bworkitem.UnderTake;
                NewEntity.UnderTake_Comment = bworkitem.UnderTake_Comment;
                NewEntity.UnderTakeLeaders  = bworkitem.UnderTakeLeaders;
                NewEntity.NiBanRen          = bworkitem.NiBanRen;
                NewEntity.NiBanRenName      = bworkitem.NiBanRenName;
                NewEntity.NiBanComment      = bworkitem.NiBanComment;
                NewEntity.Drafter           = bworkitem.Drafter;
                NewEntity.DraftDate         = bworkitem.DraftDate;
                NewEntity.RegisterID        = bworkitem.RegisterID;
                NewEntity.Prompt            = bworkitem.Prompt;
                NewEntity.ChuanYueDeptID    = bworkitem.ChuanYueDeptID;
                NewEntity.HJPrompt          = bworkitem.HJPrompt;
                NewEntity.ChuanYueLeaderID  = bworkitem.ChuanYueLeaderID;
                NewEntity.AgentUserName     = bworkitem.AgentUserName;
                NewEntity.AgentUserID       = bworkitem.AgentUserID;

                NewEntity.FormsData = XmlUtility.SerializeXml(bworkitem as EntityBase);
                FormSave.SaveEntity(NewEntity, false);

                if (B_ProcessInstance.IsCompletedOrCancel(NewEntity.ProcessID))
                {
                    B_ProcessInstance.MoveToBakTable(NewEntity.WorkItemID, "T_OA_HS_WorkItems", "T_OA_HS_WorkItems_BAK"); //在备份库中插入数据
                    B_ProcessInstance.UpdateRecordStatus(NewEntity.WorkItemID, 2);                                        //将现行库数据更新为不可用。
                }

                btnModify_Click(null, null);

                //string filedata = "<FileList />";
                //if (this.ucAttachment.UCDataList.Count > 0)
                //{
                //    string formdata = XmlUtility.SerializeXml<B_LetterReceive>(bworkitem);
                //    int iStartIndex = formdata.IndexOf("<FileList>");
                //    int iEndIndex = formdata.IndexOf("</FileList>");
                //    if (iEndIndex > iStartIndex)
                //    {
                //        filedata = formdata.Substring(iStartIndex, iEndIndex - iStartIndex);
                //        filedata += "</FileList>";
                //    }
                //}
                //FormsMethod.UpdateAssignFileData(bworkitem.ProcessID,ProcessConstString.TemplateName.LETTER_RECEIVE, "", filedata);
                List <EntityBase> bworkitemsAssign = B_FormsData.GetEntities(this.txtProcessID.Text, "", ProcessConstString.TemplateName.LETTER_RECEIVE, "", true, "'New','Assigned'");
                string            strUpdatePeople  = string.Empty;
                foreach (EntityBase entity in bworkitemsAssign)
                {
                    B_LetterReceive lentity = entity as B_LetterReceive;

                    lentity.SubmitDate = System.DateTime.Now;

                    lentity.UrgentDegree = this.ddlUrgentDegree.SelectedValue;

                    lentity.DocumentNo = this.txtDocumentNo.Text;

                    lentity.ReceiptDate  = this.txtReceiveDate.Text != string.Empty ? DateTime.Parse(this.txtReceiveDate.Text) : DateTime.MinValue;
                    lentity.FileEncoding = this.txtDocumentEncoding.Text;

                    lentity.CommunicationUnit = this.txtReceiveUnit.Text;

                    lentity.DocumentTitle = this.txtDocumentTitle.Text;

                    lentity.Remarks = this.txtRemark.Text;

                    lentity.FileList = this.ucAttachment.UCDataList;
                    FormSave.SaveEntity(lentity as EntityBase, true);
                    strUpdatePeople += lentity.ReceiveUserName + ",";
                }
                B_ToCirculate l_busCirculate = new B_ToCirculate();
                l_busCirculate.IsAgain       = true;
                l_busCirculate.ToProcessType = ProcessConstString.TemplateName.LETTER_RECEIVE;
                l_busCirculate.ToProcessID   = bworkitem.ProcessID;
                l_busCirculate.ToWorkItemID  = bworkitem.WorkItemID;
                l_busCirculate.ToUserIDS     = B_FormsData.GetProcessPeople("'Completed','Removed'", this.txtProcessID.Text, ";", true);
                string strInfo = string.Empty;
                if (l_busCirculate.ToUserIDS != string.Empty)
                {
                    strInfo = l_busCirculate.ChuanYueToDB();
                }
                strUpdatePeople = strUpdatePeople.Length > 0?strUpdatePeople.Substring(0, strUpdatePeople.Length - 1):"";
                strInfo         = strInfo.Replace("传阅成功", "二次分发成功");
                strInfo        += string.IsNullOrEmpty(strInfo) ? "" : "\\n";
                strInfo        += string.IsNullOrEmpty(strUpdatePeople) ? "" : ("(" + strUpdatePeople + ")更新成功!");
                if (strInfo != string.Empty)
                {
                    JScript.Alert(strInfo);
                }
                else
                {
                    JScript.Alert("二次分发成功!无人员传阅和数据更新!");
                }
            }
            catch
            {
                JScript.Alert("二次分发失败!");
            }
        }