New Enhanced Document Properties
DB Command Line Parameter now supports server name and ItemIDs. Added File extension parameter to Make Document
This commit is contained in:
parent
98afa51783
commit
03303d785c
@ -627,22 +627,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
if (tmp.LocalEntry != null && tmpInfo.MyEntry != null && tmp.MyEntry.MyDocument.DocID != tmpInfo.MyEntry.MyDocument.DocID)
|
if (tmp.LocalEntry != null && tmpInfo.MyEntry != null && tmp.MyEntry.MyDocument.DocID != tmpInfo.MyEntry.MyDocument.DocID)
|
||||||
EntryInfo.Refresh(tmp.MyEntry);
|
EntryInfo.Refresh(tmp.MyEntry);
|
||||||
}
|
}
|
||||||
|
// Update Enhanced Document Text
|
||||||
StepConfig sc = new StepConfig(tmp.Config);
|
StepConfig sc = new StepConfig(tmp.Config);
|
||||||
if (sc.Step_SourceToBackground != null)
|
foreach (EnhancedDocument ed in sc.MyEnhancedDocuments)
|
||||||
{
|
{ // The following should be replaced by KBR
|
||||||
int s2b = int.Parse(sc.Step_SourceToBackground);
|
ItemInfo ii = ItemInfo.Get(ed.ItemID);
|
||||||
ItemInfo iib = ItemInfo.Get(s2b);
|
Content cc = ii.MyContent.Get();
|
||||||
Content cb = Content.Get(iib.MyContent.ContentID);
|
cc.Text = tmp.Text;
|
||||||
cb.Text = tmp.Text;
|
cc.Save();
|
||||||
cb.Save();
|
|
||||||
}
|
|
||||||
if (sc.Step_SourceToDeviation != null)
|
|
||||||
{
|
|
||||||
int s2d = int.Parse(sc.Step_SourceToDeviation);
|
|
||||||
ItemInfo iid = ItemInfo.Get(s2d);
|
|
||||||
Content cd = Content.Get(iid.MyContent.ContentID);
|
|
||||||
cd.Text = tmp.Text;
|
|
||||||
cd.Save();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected virtual void RefreshFields(Content tmp)
|
protected virtual void RefreshFields(Content tmp)
|
||||||
|
@ -157,7 +157,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
private static string FixServer(string connectionString)
|
private static string FixServer(string connectionString)
|
||||||
{
|
{
|
||||||
string serverName = Volian.Base.Library.VlnSettings.GetCommand("Server",null);
|
string serverName = Volian.Base.Library.VlnSettings.GetServer();
|
||||||
if (serverName != null && serverName != "")
|
if (serverName != null && serverName != "")
|
||||||
{
|
{
|
||||||
System.Text.RegularExpressions.Match mServer = System.Text.RegularExpressions.Regex.Match(connectionString, ".*Data Source=([^;]*).*");
|
System.Text.RegularExpressions.Match mServer = System.Text.RegularExpressions.Regex.Match(connectionString, ".*Data Source=([^;]*).*");
|
||||||
|
@ -692,18 +692,19 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
public static Document New(string libTitle, byte[] docContent, string docAscii, string config)
|
public static Document New(string libTitle, byte[] docContent, string docAscii, string config, string extension)
|
||||||
{
|
{
|
||||||
Document tmp = Document.New();
|
Document tmp = Document.New();
|
||||||
tmp.LibTitle = libTitle;
|
tmp.LibTitle = libTitle;
|
||||||
tmp.DocContent = docContent;
|
tmp.DocContent = docContent;
|
||||||
tmp.DocAscii = docAscii;
|
tmp.DocAscii = docAscii;
|
||||||
tmp.Config = config;
|
tmp.Config = config;
|
||||||
|
tmp.FileExtension = extension;
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
public static Document MakeDocument(string libTitle, byte[] docContent, string docAscii, string config)
|
public static Document MakeDocument(string libTitle, byte[] docContent, string docAscii, string config, string extension)
|
||||||
{
|
{
|
||||||
Document tmp = Document.New(libTitle, docContent, docAscii, config);
|
Document tmp = Document.New(libTitle, docContent, docAscii, config, extension);
|
||||||
if (tmp.IsSavable)
|
if (tmp.IsSavable)
|
||||||
tmp = tmp.Save();
|
tmp = tmp.Save();
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user