Commit c41d2408 authored by Synthron's avatar Synthron
Browse files

Bugfix for V0.7

parent 24c659bc
{
"CurrentProjectSetting": null
}
\ No newline at end of file
File added
......@@ -42,40 +42,33 @@ namespace Lagerverwaltung
//Comboboxen füllen
private void Fill_cb()
{
//SQLite-Verbindung
string connect = "Data Source=Lagerverwaltung.sqlite;Version=3;";
SQLiteConnection Connection = new SQLiteConnection(connect);
Connection.Open();
//Comboboxen leeren und SQL-Command initialisieren
cb_tbl.Items.Clear();
string cmdstr = "Select name From sqlite_master where type='table' order by name;";
SQLiteDataAdapter sda = new SQLiteDataAdapter(cmdstr, Connection);
try
{
//SQLite-Verbindung
string connect = "Data Source=Lagerverwaltung.sqlite;Version=3;";
SQLiteConnection Connection = new SQLiteConnection(connect);
Connection.Open();
//Comboboxen leeren und SQL-Command initialisieren
cb_tbl.Items.Clear();
string cmdstr = "Select name From sqlite_master where type='table' order by name;";
SQLiteDataAdapter sda = new SQLiteDataAdapter(cmdstr, Connection);
try
sda.Fill(dt_0);
foreach (DataRow row in dt_0.Rows) //Tabellennamen in Comboboxen speichern, außer SQLite Standardtabelle
{
sda.Fill(dt_0);
foreach (DataRow row in dt_0.Rows) //Tabellennamen in Comboboxen speichern, außer SQLite Standardtabelle
if ((row["name"].ToString() != "sqlite_sequence") && (row["name"].ToString() != "settings") && (row["name"].ToString() != "barcode_index"))
{
if ((row["name"].ToString() != "sqlite_sequence") && (row["name"].ToString() != "settings") && (row["name"].ToString() != "barcode_index"))
{
cb_tbl.Items.Add(row["name"]);
}
cb_tbl.Items.Add(row["name"]);
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
dt_0.Clear();
Connection.Close();
}
catch
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
dt_0.Clear();
Connection.Close();
}
//Spalte hinzufügen
......@@ -183,24 +176,13 @@ namespace Lagerverwaltung
this.label2.Text = GlobalVariables.res_man.GetString("label_col", GlobalVariables.cul);
this.label3.Text = GlobalVariables.res_man.GetString("label_table", GlobalVariables.cul);
this.lb_rn.Text = GlobalVariables.res_man.GetString("label_new", GlobalVariables.cul);
this.tabPage1.Text = GlobalVariables.res_man.GetString("gb_col_add", GlobalVariables.cul);
this.tabPage5.Text = GlobalVariables.res_man.GetString("gb_table_del", GlobalVariables.cul);
this.tabPage3.Text = GlobalVariables.res_man.GetString("gb_col_del", GlobalVariables.cul);
this.tabPage4.Text = GlobalVariables.res_man.GetString("gb_tbl_rn", GlobalVariables.cul);
this.tabPage2.Text = GlobalVariables.res_man.GetString("gb_col_rn", GlobalVariables.cul);
/* Durch Umstellung auf DropDownList unnötig
* ab V0.5
//Comboboxen
this.cb_tbs_new.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_del_tbl.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_col_data.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_tbl_del.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_col_del.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_tbl_del.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
this.cb_col_del.Text = GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul);
*/
//Buttons
this.button1.Text = GlobalVariables.res_man.GetString("btn_col_add", GlobalVariables.cul);
this.btn_tbl_drop.Text = GlobalVariables.res_man.GetString("btn_table_del", GlobalVariables.cul);
......
......@@ -131,7 +131,7 @@ namespace Lagerverwaltung
isCol = 0;
isEmpty = 1;
string barcode = "INSERT INTO barcode_index ('table') VALUES (" + name + ")";
string barcode = "INSERT INTO barcode_index (tbl) VALUES ('" + name + "')";
SQLiteCommand barcode_Lookup = new SQLiteCommand(barcode, Connection);
barcode_Lookup.ExecuteNonQuery();
......
......@@ -77,13 +77,9 @@ namespace Lagerverwaltung
catch { }
if (GlobalVariables.db_comp == true)
{
try
if (cb_tblChoose.Items.Count != 0)
{
cb_tblChoose.SelectedIndex = 0;
}
catch
{
}
if (GlobalVariables.lang == "de")
{
......@@ -133,12 +129,11 @@ namespace Lagerverwaltung
this.dataGridView1.Columns["ID"].ReadOnly = true;
this.dataGridView1.Columns["ID"].Width = 35;
try
if(dataGridView1.Columns.Contains("Barcodes") == true)
{
dataGridView1.Columns["Barcodes"].ReadOnly = true;
dataGridView1.Columns["Barcodes"].Width = 80;
}
catch { }
}
catch (Exception ex)
{
......@@ -217,7 +212,6 @@ namespace Lagerverwaltung
{
try
{
//if (cb_tblChoose.Text != GlobalVariables.res_man.GetString("cb_choose", GlobalVariables.cul))
if (cb_tblChoose.Text != "")
{
//Speichern der Tabelle in die Datenbank
......@@ -240,7 +234,7 @@ namespace Lagerverwaltung
}
else
{
MessageBox.Show(GlobalVariables.res_man.GetString("string_col_no", GlobalVariables.cul));
MessageBox.Show(GlobalVariables.res_man.GetString("string_col_no", GlobalVariables.cul), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
catch
......
This source diff could not be displayed because it is too large. You can view the blob instead.
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.6.1", FrameworkDisplayName = ".NET Framework 4.6.1")]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment