This commit is contained in:
parent
950c9368f1
commit
da9b899424
@ -1,70 +0,0 @@
|
|||||||
// ========================================================================
|
|
||||||
// Copyright 2006 - Volian Enterprises, Inc. All rights reserved.
|
|
||||||
// Volian Enterprises - Proprietary Information - DO NOT COPY OR DISTRIBUTE
|
|
||||||
// ------------------------------------------------------------------------
|
|
||||||
// $Workfile: $ $Revision: $
|
|
||||||
// $Author: $ $Date: $
|
|
||||||
//
|
|
||||||
// $History: $
|
|
||||||
// ========================================================================
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Drawing;
|
|
||||||
using System.Collections;
|
|
||||||
using System.ComponentModel;
|
|
||||||
using System.Windows.Forms;
|
|
||||||
using System.Data;
|
|
||||||
using System.Data.OleDb;
|
|
||||||
using System.Collections.Specialized;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Xml;
|
|
||||||
using System.IO;
|
|
||||||
using System.Text;
|
|
||||||
using Volian.CSLA.Library;
|
|
||||||
|
|
||||||
namespace DataLoader
|
|
||||||
{
|
|
||||||
public partial class frmLoader : Form
|
|
||||||
{
|
|
||||||
private Structure AddStructure(byte FromType, int FromID, byte ContentType, int ContentID, string stpseq,
|
|
||||||
DateTime dts, string userid)
|
|
||||||
{
|
|
||||||
Structure str = null;
|
|
||||||
string str_key = ProcNumber + "|";
|
|
||||||
switch (ContentType)
|
|
||||||
{
|
|
||||||
case 1:
|
|
||||||
str_key += stpseq;
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
str_key += stpseq.Substring(0, 1)+"0";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
str_key += stpseq;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (dicTrans_StrIds.ContainsKey(str_key))
|
|
||||||
{
|
|
||||||
str = Structure.Get(dicTrans_StrIds[str_key]);
|
|
||||||
str.FromID = FromID;
|
|
||||||
str.FromType = FromType;
|
|
||||||
str.ContentID = ContentID;
|
|
||||||
str.ContentType = ContentType;
|
|
||||||
str.DTS = dts;
|
|
||||||
str.UserID = (userid==null||userid=="")?"empty":userid;
|
|
||||||
str.Save(true); ;
|
|
||||||
dicTrans_StrIds.Remove(str_key);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
str = Structure.MakeStructure(FromType, FromID, ContentType, ContentID, dts, userid);
|
|
||||||
}
|
|
||||||
if (dicTrans_StrDone.ContainsKey(str_key))
|
|
||||||
log.ErrorFormat("Duplicate proc/sequence number during structure migration: {0}", str_key);
|
|
||||||
else
|
|
||||||
dicTrans_StrDone.Add(str_key, str.StructureID);
|
|
||||||
|
|
||||||
return str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user