WorkFlowSelectDoc.aspx.cs
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:3k
- using System;
- using System.Data;
- using System.Configuration;
- using System.Collections;
- using System.Web;
- using System.Web.Security;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Web.UI.WebControls.WebParts;
- using System.Web.UI.HtmlControls;
- using System.IO;
- using System.Text;
- using com.etong.DAL.FC;
- public partial class Workflow_WorkFlowSelectDoc : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- if (!IsPostBack)
- {
- string FDir = "c://";
- //ArrayList FList = new ArrayList();
- FDir = Server.MapPath(Request.ServerVariables["PATH_INFO"]);
- FDir = FDir.Substring(0, FDir.Length - (FDir.Split('\').GetValue(FDir.Split('\').Length - 1)).ToString().Length);
- FDir = FDir + "Doc";
- string[] FList;
- string FDirName;
- int starti = 0;
- if (Directory.Exists(FDir) == true)
- {
- FList = Directory.GetFiles(FDir);
- for (Int16 i = 0; i < FList.Length; i++)
- {
- ListItem lst = new ListItem();
- FDirName = FList.GetValue(i).ToString();
- starti =FDirName.Length - (FDirName.Split('\').GetValue(FDirName.Split('\').Length - 1)).ToString().Length;
- lst.Text = FDirName.Substring(starti,FDirName.Length-starti);
- lst.Value = FDirName;
- lbDoc.Items.Add(lst);
- }
- }
- try
- {
- int strM = Convert.ToInt32(Request.QueryString["StrM"]);
- if (strM > -1)
- {
- EtongFlyChouWF EFlyWF = new EtongFlyChouWF();
- DataView dv = new DataView();
- dv = EFlyWF.GetActFName(strM);
- starti = 0;
- string sDoc;
- for (int k = 0; k < dv.Table.Rows.Count; k++)
- {
- ListItem lstk = new ListItem();
- sDoc = dv.Table.Rows[k][0].ToString();
- starti = sDoc.Length - (sDoc.Split('\').GetValue(sDoc.Split('\').Length - 1)).ToString().Length;
- lstk.Text = sDoc.Substring(starti, sDoc.Length - starti);
- lstk.Value = sDoc;
- LstDoc.Items.Add(lstk);
- }
- }
- }
- catch
- {
- }
- }
- }
- protected void ImgOK_Click(object sender, ImageClickEventArgs e)
- {
- string RetSelectValue = "";
- RetSelectValue = HSelectedValue.Value + "|" + HSelectedText.Value;
- this.ClientScript.RegisterStartupScript(this.GetType(), "", "window.returnValue='" + RetSelectValue + "';window.close();", true);
- }
- }