示例#1
0
        private void NextDocument(long lDocID)
        {
            long DefineID;

            UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow();

            DefineID = df.GetNextDefineID(lDocID);

            if (DefineID > 0)
            {
                //发送到下一环节
                switch (df.GetTacheRule(DefineID))
                {
                case 0:                                                                                         //按项目走
                    if (df.GetParentProjectAccount(UserName) > 0)                                               //有上级项目
                    {
                        df = null;
                        Server.Transfer("SelectProject.aspx?DocID=" + lDocID.ToString() + "&DefineID=" + DefineID.ToString());
                    }
                    else                                                                                                                        //没有上级项目
                    {
                        Response.Write("<script language='javascript'>alert('" + df.DoMessage(-3, lDocID) + "');</script>");
                        df = null;
                    }
                    break;

                case 1:                                                                                                                         //按部门走
                    Response.Write("<script language='javascript'>alert('" + df.DoMessage(df.PostDocument(UserName, DocID, DefineID, 0), DocID) + "');</script>");
                    break;

                case 2:                                                                                                                         //其他:环节全部的人都走
                    break;

                default:
                    break;
                }
            }
            else
            {
                df.FinishDocument(lDocID);                                                                                      //没有下一环节,结束
            }
            df = null;
        }
示例#2
0
        private void NextDocument(long lDocID)
        {
            long DefineID;

            UDS.Components.DocumentFlow df =new UDS.Components.DocumentFlow();

            DefineID = df.GetNextDefineID(lDocID);

            if(DefineID>0)
            {
                //���͵���һ����
                switch(df.GetTacheRule(DefineID))
                {
                    case 0:													//����Ŀ��
                        if(df.GetParentProjectAccount(UserName)>0)			//���ϼ���Ŀ
                        {
                            df = null;
                            Server.Transfer("SelectProject.aspx?DocID=" + lDocID.ToString() + "&DefineID=" + DefineID.ToString());
                        }
                        else												//û���ϼ���Ŀ
                        {
                            Response.Write("<script language='javascript'>alert('" + df.DoMessage(-3,lDocID) + "');</script>");
                            df = null;
                        }
                        break;
                    case 1:													//��������
                        Response.Write("<script language='javascript'>alert('" + df.DoMessage(df.PostDocument(UserName,DocID,DefineID,0),DocID) + "');</script>");
                        break;
                    case 2:													//����������ȫ�����˶���
                        break;
                    default:
                        break;
                }
            }
            else
                df.FinishDocument(lDocID);									//û����һ���ڣ�����

            df = null;
        }