DB Command Line Parameter now supports server name and ItemIDs.
This commit is contained in:
parent
03303d785c
commit
d452b2f5b3
@ -79,6 +79,37 @@ namespace Volian.Base.Library
|
|||||||
}
|
}
|
||||||
set { _ComparePROMStoPROMSPDF = value; }
|
set { _ComparePROMStoPROMSPDF = value; }
|
||||||
}
|
}
|
||||||
|
public static string GetDB()
|
||||||
|
{
|
||||||
|
string str = GetCommand("DB", null);
|
||||||
|
if (str == null) return null;
|
||||||
|
if(str.Contains( ":"))
|
||||||
|
{
|
||||||
|
string[] parts = str.Split(":".ToCharArray());
|
||||||
|
if (parts.Length > 1) return parts[1];
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
public static string GetServer()
|
||||||
|
{
|
||||||
|
string str = GetCommand("DB", null);
|
||||||
|
if (str.Contains(":"))
|
||||||
|
{
|
||||||
|
string[] parts = str.Split(":".ToCharArray());
|
||||||
|
return parts[0].Replace("._",".\\");
|
||||||
|
}
|
||||||
|
return GetCommand("Server",null);
|
||||||
|
}
|
||||||
|
public static string GetItemIDs()
|
||||||
|
{
|
||||||
|
string str = GetCommand("DB", null);
|
||||||
|
if (str.Contains(":"))
|
||||||
|
{
|
||||||
|
string[] parts = str.Split(":".ToCharArray());
|
||||||
|
if(parts.Length > 2) return parts[2];
|
||||||
|
}
|
||||||
|
return GetCommand("ItemIDs", "");
|
||||||
|
}
|
||||||
public static string GetCommand(string commandName, string def)
|
public static string GetCommand(string commandName, string def)
|
||||||
{
|
{
|
||||||
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user