static void Main(string[] args) { List <FullIdentifier> identifiers = new List <FullIdentifier>(); //===================================================================================================================== DataSet DS = new DataSet(); SqlDataAdapter DA = new SqlDataAdapter(); DA.SelectCommand = new SqlCommand(); DA.SelectCommand.Connection = new SqlConnection("Data Source=192.168.4.25,1443;Initial Catalog=EXPORTNEB;Persist Security Info=True;User ID=OAIUSER;Password=User_OAI;Connection Timeout = 1200"); DA.SelectCommand.CommandText = "select * from BookAddInf..ScanInfo where PDF = 1 and ForAllReader = 1"; int i = DA.Fill(DS, "rec"); foreach (DataRow row in DS.Tables["rec"].Rows) { if (row["IDBase"].ToString() == "1") { FullIdentifier id = new FullIdentifier("BJVVV" + row["IDBook"].ToString(), "dlopen"); identifiers.Add(id); } else { FullIdentifier id = new FullIdentifier("REDKOSTJ" + row["IDBook"].ToString(), "dlopen"); identifiers.Add(id); } } //===================================================================================================================== string[] lines = File.ReadAllLines("f:\\PinsForNeb_dllocal.txt"); foreach (string line in lines) { identifiers.Add(new FullIdentifier("BJVVV" + line, "dllocal")); } //===================================================================================================================== lines = File.ReadAllLines("f:\\PinsForNeb_dlopen.txt"); foreach (string line in lines) { identifiers.Add(new FullIdentifier("BJVVV" + line, "dlopen")); } XmlDocument xdoc = GetXmlDocument(identifiers); xdoc.Save("f:\\elar_electronic_pins.xml"); Console.WriteLine("Готово"); Console.ReadKey(); }
public override int GetHashCode() { return(FullIdentifier.GetHashCode()); }