private void CreateSirketDB() { sqlStrList = ArsLibrary.ReadArtSQL("sirket.sqlArt"); if (arsProgress != null) { arsProgress.setPerProgMax(sqlStrList.Length); string execSQLStr = ""; bool isFirst = true; bool canExec = true; foreach (string sqlStr in sqlStrList) { if (sqlStr.Contains("--Açıklama:")) { arsProgress.lblMes.Text = sqlStr.AfterChr(':'); if (!isFirst && canExec) { ArsSQLQry qrySQL = new ArsSQLQry(); qrySQL.SQLText = execSQLStr; qrySQL.Open(); execSQLStr = ""; } isFirst = false; canExec = true; continue; } if (!canExec) { continue; } if (sqlStr.Contains("--Version:") && ArsLibrary.GetLineCFG("DBVersion") != "" && Convert.ToInt32(ArsLibrary.GetLineCFG("DBVersion")) >= Convert.ToInt32(sqlStr.AfterChr(':'))) { canExec = false; } if (canExec) { execSQLStr += sqlStr + "\n"; } arsProgress.progressFormPBC.Position++; Thread.Sleep(5); } if (execSQLStr != "") { ArsSQLQry qrySQL = new ArsSQLQry(); qrySQL.SQLText = execSQLStr; qrySQL.Open(); } } }
private void CreateArtezDB() { sqlStrList = ArsLibrary.ReadArtSQL("artez.sqlArt"); if (arsProgress != null) { arsProgress.setPerProgMax(sqlStrList.Length); string execSQLStr = ""; bool isFirst = true; foreach (string sqlStr in sqlStrList) { if (sqlStr.Contains("--Açıklama:")) { arsProgress.lblMes.Text = sqlStr.AfterChr(':'); if (!isFirst && execSQLStr != "") { ArsSQLQry qrySQL = new ArsSQLQry(); qrySQL.SQLText = execSQLStr; qrySQL.Open(); execSQLStr = ""; } isFirst = false; } else { execSQLStr += sqlStr + "\n"; } arsProgress.progressFormPBC.Position++; Thread.Sleep(5); } if (execSQLStr != "") { ArsSQLQry qrySQL = new ArsSQLQry(); qrySQL.SQLText = execSQLStr; qrySQL.Open(); } } }