private void cmdSend_Click(object sender, System.EventArgs e) { //发送到下一环节,使程序处于运行中 UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); if (ProjectID >= 0) { int iResult = df.PostDocument(UserName, DocID, ProjectID); if (iResult == 0) { df = null; Server.Transfer("DisplayDocument.aspx?DocID=" + DocID.ToString()); } else { Response.Write("<script lanuage='javascript'>alert('" + df.DoMessage(iResult, DocID, false) + "');</script>"); } } else { Response.Write("<script language='javascript'>alert('用户没有一个项目,不能按项目发送!');</script>"); } df = null; }
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; }
private void cmdPostilNext_Click(object sender, System.EventArgs e) { UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); HtmlForm FrmNewDocument = (HtmlForm)this.Page.FindControl("PostilDocument"); TextBox tmpText; tmpText = (TextBox)FrmNewDocument.FindControl("txtPostil"); long PostilID; try { if (ProjectID >= 0) { PostilID = df.AddPostil(UserName, DocID, tmpText.Text, 1, ProjectID, 2); int iResult; iResult = df.PostDocument(UserName, DocID, ProjectID); if (iResult == 0) { UploadFile(PostilID); } else { Response.Write("<script lanuage='javascript'>alert('" + df.DoMessage(iResult, DocID, false) + "');</script>"); } } else { Response.Write("<script lanuage='javascript'>alert('没有上级项目!');</script>"); } } catch (Exception ex) { UDS.Components.Error.Log(ex.ToString()); } finally { df = null; } Response.AddHeader("Refresh", "1"); }
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; }
private void cmdSend_Click(object sender, System.EventArgs e) { //���͵���һ���ڣ�ʹ������������ UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); if(ProjectID>=0) { int iResult = df.PostDocument(UserName,DocID,ProjectID); if(iResult==0) { df = null; Server.Transfer("DisplayDocument.aspx?DocID=" + DocID.ToString()); } else { Response.Write("<script lanuage='javascript'>alert('" + df.DoMessage(iResult,DocID,false) + "');</script>"); } } else Response.Write("<script language='javascript'>alert('�û�û��һ����Ŀ�����ܰ���Ŀ���ͣ�');</script>"); df = null; }
private void cmdPostilNext_Click(object sender, System.EventArgs e) { UDS.Components.DocumentFlow df = new UDS.Components.DocumentFlow(); HtmlForm FrmNewDocument = (HtmlForm)this.Page.FindControl("PostilDocument"); TextBox tmpText; tmpText = (TextBox)FrmNewDocument.FindControl("txtPostil"); long PostilID; try { if(ProjectID>=0) { PostilID = df.AddPostil(UserName,DocID,tmpText.Text,1,ProjectID,2); int iResult; iResult = df.PostDocument(UserName,DocID,ProjectID); if(iResult==0) { UploadFile(PostilID); } else { Response.Write("<script lanuage='javascript'>alert('" + df.DoMessage(iResult,DocID,false) + "');</script>"); } } else { Response.Write("<script lanuage='javascript'>alert('û���ϼ���Ŀ��');</script>"); } } catch(Exception ex) { UDS.Components.Error.Log(ex.ToString()); } finally { df = null; } Response.AddHeader("Refresh","1"); }