private DataTable GetNewFiles() { string sql = "select ITEM_NAME,PRODUCT_SERIAL_NUM,FILE_NAME,ITEM_VER,UPDATE_DATE,PATH,ID from PROGRAM_AUTO_UPDATE where ITEM_NAME='" + ini.IniReadValue("UpdateProgram", "ProgramName") + "'"; //string sql = "select ITEM_NAME,PRODUCT_SERIAL_NUM,FILE_NAME,ITEM_VER,UPDATE_DATE,PATH,ID from PROGRAM_AUTO_UPDATE "; DataTable dt = DBC.getDataSet(sql).Tables[0]; return(dt); }
private void CheckIniExist() { //ini.IniWriteValue("File", "File", "file1"); if (!File.Exists(UpdateIniPath)) { FileStream fs = new FileStream(UpdateIniPath, FileMode.OpenOrCreate, FileAccess.Write); fs.Close(); // File.Create(UpdateIniPath); } ini = new ClsIni(UpdateIniPath); if (ini.IniReadValue("StartProgram", StartExe) == "" || ini.IniReadValue("StartProgram", StartExe) == null) { ini.IniWriteValue("Start", StartExe, "SIS.exe"); } if (ini.IniReadValue("UpdateProgram", "ProgramName") == "" || ini.IniReadValue("UpdateProgram", "ProgramName") == null) { ini.IniWriteValue("UpdateProgram", "ProgramName", "SIS工作站"); } }
public void createConStr() { this.DBType = ini.IniReadValue("PacsConnectionString", "DbType"); // 连接HIS类型 string server = ini.IniReadValue("PacsConnectionString", "Server"); // string uid = ini.IniReadValue("PacsConnectionString", "Uid"); // HIS用户名 string pwd = ini.IniReadValue("PacsConnectionString", "Pwd"); // HIS数据库密码 string database = ini.IniReadValue("PacsConnectionString", "Database"); // 数据库HIS类型 switch (this.DBType) { case "SQLSERVER": this.StrConn = @"server=" + server.Trim() + ";uid=" + uid.Trim() + ";pwd=" + pwd.Trim() + ";database=" + database.Trim(); break; case "ORACLE": this.StrConn = @"User ID=" + uid + ";Password="******";Data Source=" + database + ";"; break; case "ODBC": this.StrConn = @"Driver={Microsoft ODBC for Oracle};Server=" + database + ";Uid=" + uid + ";Pwd=" + pwd; break; case "ACCESS": this.StrConn = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + database; break; } }