www.pudn.com > WorkflowDesigner.rar > ImportFlie.cs, change:2008-03-20,size:1000b


using System; 
using System.Collections.Generic; 
using System.Text; 
using Bussiness; 
using System.Data; 
using System.IO; 
using System.Xml; 
namespace WorkflowDesigner 
{ 
    public class ImportFlie 
    { 
        private XmlDocument doc = new XmlDocument(); 
        //导入文件 
        public ImportFlie() 
        {  
         
        } 
 
 
        public ImportFlie(String filename) 
		{ 
			doc.Load(filename); 
		} 
 
        public ImportFlie(Stream stream) 
        { 
            doc.Load(stream); 
        } 
 
		// 导入数据库 
		public void Import() 
		{ 
 
            //连接资料库的名称需要改成由Workflow从配置文件中去读取 
 
 
            try 
            { 
                DO_IMPORT oper = new DO_IMPORT(); 
                //根据ID得到原来的包是否存在 
                oper.UpdatePackageInfo(doc); 
            } 
            catch (Exception err) 
            { 
                throw err; 
                 
            } 
 
             
            
		} 
 
		 
    } 
}