示例#1
0
	protected void btnUpload_Click(object sender, EventArgs e)
	{
		if (this.fuASPFlatFile.HasFile)
		{
			string[] theFileName	= this.fuASPFlatFile.FileName.Split('.');
			string theFileSavePath	= String.Format("{0}\\{1}_{2}{3}{4}{5}{6}{7}.{8}", this.SavePath, theFileName[0], 
				DateTime.Now.Year, DateTime.Now.Month, DateTime.Now.Day, DateTime.Now.Hour, DateTime.Now.Minute, DateTime.Now.Second, 
				theFileName[1]);

			this.fuASPFlatFile.SaveAs(theFileSavePath);
			Response.Write(theFileSavePath);

			DataDictionaryManagerment theDDM	= new DataDictionaryManagerment(this.DataDictionaryPath);
			SAPFlatFileParser theSAPParser;
			switch (this.FlatFile)
			{
				case FlatFile.Comn:
					theSAPParser	= new ComnParser(theFileSavePath, this.ConnectionString, theDDM);
					break;
				case FlatFile.Paltno:
					theSAPParser	= new PaltnoParser(theFileSavePath, this.ConnectionString, theDDM);
					break;
				case FlatFile.Edi850raw:
					theSAPParser	= new EDI850RAWParser(theFileSavePath, this.ConnectionString, theDDM);
					break;
                case FlatFile.Edi850rawINSTR:
                    theSAPParser = new EDI850RAWINSTRParser(theFileSavePath, this.ConnectionString, theDDM);
                    break;
				default:
					theSAPParser	= new SAPFlatFileParser(theFileSavePath, this.ConnectionString);
				    break;
			}
			theSAPParser.LoadDataFile();
		}
	}
示例#2
0
        public EDI850RAWParser(string aDataFilePath, string aConnectionString, DataDictionaryManagerment aDDM):base(aDataFilePath, aConnectionString)
		{
			this.m_DataDictionaryManagerment	= aDDM;
			this.m_DataDictionaryList			= this.m_DataDictionaryManagerment.Edi850rawList;
			//this.m_DataDictionaryTable	= this.m_DataDictionary.Tables["edi850raw"];
		}
示例#3
0
		public ComnParser(string aDataFilePath, string aConnectionString, DataDictionaryManagerment aDDM):base(aDataFilePath, aConnectionString)
		{
			this.m_DataDictionaryManagerment	= aDDM;
			this.m_DataDictionaryList			= this.m_DataDictionaryManagerment.ComnList;
			//this.m_DataDictionaryTable	= this.m_DataDictionary.Tables["comn"];
		}
示例#4
0
        public PaltnoParser(string aDataFilePath, string aConnectionString, DataDictionaryManagerment aDDM):base(aDataFilePath, aConnectionString)
		{
			this.m_DataDictionaryManagerment	= aDDM;
			this.m_DataDictionaryList			= this.m_DataDictionaryManagerment.PaltnoList;
			//this.m_DataDictionaryTable	= this.m_DataDictionary.Tables["paltno"];
		}