diff --git a/.vs/Superbuchhaltung/v16/.suo b/.vs/Superbuchhaltung/v16/.suo index 9b81fe8..cca0b51 100644 Binary files a/.vs/Superbuchhaltung/v16/.suo and b/.vs/Superbuchhaltung/v16/.suo differ diff --git a/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide b/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide index a67ee6f..df0ee27 100644 Binary files a/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide and b/.vs/Superbuchhaltung/v16/Server/sqlite3/storage.ide differ diff --git a/Superbuchhaltung/Forms/Form1.Designer.cs b/Superbuchhaltung/Forms/Form1.Designer.cs index 5997933..2fe913c 100644 --- a/Superbuchhaltung/Forms/Form1.Designer.cs +++ b/Superbuchhaltung/Forms/Form1.Designer.cs @@ -28,7 +28,6 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main)); this.panel1 = new System.Windows.Forms.Panel(); this.Kat0btn = new System.Windows.Forms.Button(); @@ -37,20 +36,33 @@ this.button1 = new System.Windows.Forms.Button(); this.PH = new System.Windows.Forms.Panel(); this.PHdataview = new System.Windows.Forms.DataGridView(); + this.BNummer = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.BWert = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Pdataview = new System.Windows.Forms.DataGridView(); this.toolStrip1 = new System.Windows.Forms.ToolStrip(); + this.toolStripDropDownButton1 = new System.Windows.Forms.ToolStripDropDownButton(); + this.addentrieToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.reloadToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.modifyToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem(); + this.queryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.Databtn = new System.Windows.Forms.ToolStripDropDownButton(); this.modifyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.Addentriemenuueitem = new System.Windows.Forms.ToolStripMenuItem(); this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); - this.timer1 = new System.Windows.Forms.Timer(this.components); - this.BNummer = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.BName = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.BWert = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.P = new System.Windows.Forms.Panel(); + this.Pdatagridview = new System.Windows.Forms.DataGridView(); + this.dataGridViewTextBoxColumn1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.dataGridViewTextBoxColumn3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.panel1.SuspendLayout(); this.panel2.SuspendLayout(); this.PH.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.PHdataview)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.Pdataview)).BeginInit(); this.toolStrip1.SuspendLayout(); + this.P.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.Pdatagridview)).BeginInit(); this.SuspendLayout(); // // panel1 @@ -144,7 +156,7 @@ this.BNummer, this.BName, this.BWert}); - this.PHdataview.Location = new System.Drawing.Point(0, 28); + this.PHdataview.Location = new System.Drawing.Point(3, 25); this.PHdataview.Name = "PHdataview"; this.PHdataview.RowHeadersWidth = 10; this.PHdataview.RowTemplate.Height = 24; @@ -152,17 +164,91 @@ this.PHdataview.TabIndex = 0; this.PHdataview.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DataGridView1_CellContentClick); // + // BNummer + // + this.BNummer.HeaderText = "Kontennummer"; + this.BNummer.MinimumWidth = 6; + this.BNummer.Name = "BNummer"; + this.BNummer.ReadOnly = true; + this.BNummer.Width = 125; + // + // BName + // + this.BName.HeaderText = "Kontenname"; + this.BName.MinimumWidth = 6; + this.BName.Name = "BName"; + this.BName.ReadOnly = true; + this.BName.Width = 512; + // + // BWert + // + this.BWert.HeaderText = "Kontensumme"; + this.BWert.MinimumWidth = 6; + this.BWert.Name = "BWert"; + this.BWert.ReadOnly = true; + this.BWert.Width = 125; + // + // Pdataview + // + this.Pdataview.ColumnHeadersHeight = 29; + this.Pdataview.Location = new System.Drawing.Point(0, 0); + this.Pdataview.Name = "Pdataview"; + this.Pdataview.RowHeadersWidth = 51; + this.Pdataview.Size = new System.Drawing.Size(240, 150); + this.Pdataview.TabIndex = 0; + // // toolStrip1 // this.toolStrip1.ImageScalingSize = new System.Drawing.Size(20, 20); this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { - this.Databtn}); + this.toolStripDropDownButton1}); this.toolStrip1.Location = new System.Drawing.Point(0, 0); this.toolStrip1.Name = "toolStrip1"; + this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.System; this.toolStrip1.Size = new System.Drawing.Size(1120, 27); - this.toolStrip1.TabIndex = 3; - this.toolStrip1.Text = "toolStrip1"; - this.toolStrip1.ItemClicked += new System.Windows.Forms.ToolStripItemClickedEventHandler(this.ToolStrip1_ItemClicked); + this.toolStrip1.TabIndex = 0; + // + // toolStripDropDownButton1 + // + this.toolStripDropDownButton1.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text; + this.toolStripDropDownButton1.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addentrieToolStripMenuItem, + this.reloadToolStripMenuItem, + this.modifyToolStripMenuItem1, + this.queryToolStripMenuItem}); + this.toolStripDropDownButton1.Image = ((System.Drawing.Image)(resources.GetObject("toolStripDropDownButton1.Image"))); + this.toolStripDropDownButton1.ImageTransparentColor = System.Drawing.Color.Magenta; + this.toolStripDropDownButton1.Name = "toolStripDropDownButton1"; + this.toolStripDropDownButton1.Size = new System.Drawing.Size(55, 24); + this.toolStripDropDownButton1.Text = "Data"; + // + // addentrieToolStripMenuItem + // + this.addentrieToolStripMenuItem.Name = "addentrieToolStripMenuItem"; + this.addentrieToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.addentrieToolStripMenuItem.Text = "Addentrie"; + this.addentrieToolStripMenuItem.Click += new System.EventHandler(this.AddentrieToolStripMenuItem_Click); + // + // reloadToolStripMenuItem + // + this.reloadToolStripMenuItem.Name = "reloadToolStripMenuItem"; + this.reloadToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.reloadToolStripMenuItem.Text = "Reload"; + this.reloadToolStripMenuItem.Click += new System.EventHandler(this.ReloadToolStripMenuItem_Click); + // + // modifyToolStripMenuItem1 + // + this.modifyToolStripMenuItem1.Name = "modifyToolStripMenuItem1"; + this.modifyToolStripMenuItem1.Size = new System.Drawing.Size(224, 26); + this.modifyToolStripMenuItem1.Text = "Modify"; + this.modifyToolStripMenuItem1.Click += new System.EventHandler(this.ModifyToolStripMenuItem1_Click); + // + // queryToolStripMenuItem + // + this.queryToolStripMenuItem.Name = "queryToolStripMenuItem"; + this.queryToolStripMenuItem.Size = new System.Drawing.Size(224, 26); + this.queryToolStripMenuItem.Text = "Query"; + this.queryToolStripMenuItem.Click += new System.EventHandler(this.QueryToolStripMenuItem_Click); // // Databtn // @@ -198,35 +284,58 @@ this.refreshToolStripMenuItem.Text = "Refresh"; this.refreshToolStripMenuItem.Click += new System.EventHandler(this.RefreshToolStripMenuItem_Click); // - // timer1 + // P // - this.timer1.Enabled = true; - this.timer1.Interval = 10000; - this.timer1.Tick += new System.EventHandler(this.Timer1_Tick); + this.P.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.P.Controls.Add(this.Pdatagridview); + this.P.Location = new System.Drawing.Point(200, 0); + this.P.Name = "P"; + this.P.Size = new System.Drawing.Size(919, 556); + this.P.TabIndex = 3; // - // BNummer + // Pdatagridview // - this.BNummer.HeaderText = "Kontennummer"; - this.BNummer.MinimumWidth = 6; - this.BNummer.Name = "BNummer"; - this.BNummer.ReadOnly = true; - this.BNummer.Width = 125; + this.Pdatagridview.AllowUserToAddRows = false; + this.Pdatagridview.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.Pdatagridview.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.Pdatagridview.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.dataGridViewTextBoxColumn1, + this.dataGridViewTextBoxColumn2, + this.dataGridViewTextBoxColumn3}); + this.Pdatagridview.Location = new System.Drawing.Point(3, 25); + this.Pdatagridview.Name = "Pdatagridview"; + this.Pdatagridview.RowHeadersWidth = 10; + this.Pdatagridview.RowTemplate.Height = 24; + this.Pdatagridview.Size = new System.Drawing.Size(916, 531); + this.Pdatagridview.TabIndex = 0; // - // BName + // dataGridViewTextBoxColumn1 // - this.BName.HeaderText = "Kontenname"; - this.BName.MinimumWidth = 6; - this.BName.Name = "BName"; - this.BName.ReadOnly = true; - this.BName.Width = 512; + this.dataGridViewTextBoxColumn1.HeaderText = "Kontennummer"; + this.dataGridViewTextBoxColumn1.MinimumWidth = 6; + this.dataGridViewTextBoxColumn1.Name = "dataGridViewTextBoxColumn1"; + this.dataGridViewTextBoxColumn1.ReadOnly = true; + this.dataGridViewTextBoxColumn1.Width = 125; // - // BWert + // dataGridViewTextBoxColumn2 // - this.BWert.HeaderText = "Kontensumme"; - this.BWert.MinimumWidth = 6; - this.BWert.Name = "BWert"; - this.BWert.ReadOnly = true; - this.BWert.Width = 125; + this.dataGridViewTextBoxColumn2.HeaderText = "Kontenname"; + this.dataGridViewTextBoxColumn2.MinimumWidth = 6; + this.dataGridViewTextBoxColumn2.Name = "dataGridViewTextBoxColumn2"; + this.dataGridViewTextBoxColumn2.ReadOnly = true; + this.dataGridViewTextBoxColumn2.Width = 512; + // + // dataGridViewTextBoxColumn3 + // + this.dataGridViewTextBoxColumn3.HeaderText = "Kontensumme"; + this.dataGridViewTextBoxColumn3.MinimumWidth = 6; + this.dataGridViewTextBoxColumn3.Name = "dataGridViewTextBoxColumn3"; + this.dataGridViewTextBoxColumn3.ReadOnly = true; + this.dataGridViewTextBoxColumn3.Width = 125; // // Main // @@ -247,8 +356,11 @@ this.panel2.ResumeLayout(false); this.PH.ResumeLayout(false); ((System.ComponentModel.ISupportInitialize)(this.PHdataview)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.Pdataview)).EndInit(); this.toolStrip1.ResumeLayout(false); this.toolStrip1.PerformLayout(); + this.P.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.Pdatagridview)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -263,15 +375,25 @@ private System.Windows.Forms.Button Homebtn; private System.Windows.Forms.Panel PH; private System.Windows.Forms.DataGridView PHdataview; + private System.Windows.Forms.DataGridView Pdataview; private System.Windows.Forms.ToolStrip toolStrip1; private System.Windows.Forms.ToolStripDropDownButton Databtn; private System.Windows.Forms.ToolStripMenuItem Addentriemenuueitem; - private System.Windows.Forms.Timer timer1; private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem modifyToolStripMenuItem; private System.Windows.Forms.DataGridViewTextBoxColumn BNummer; private System.Windows.Forms.DataGridViewTextBoxColumn BName; private System.Windows.Forms.DataGridViewTextBoxColumn BWert; + private System.Windows.Forms.Panel P; + private System.Windows.Forms.DataGridView Pdatagridview; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn1; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn2; + private System.Windows.Forms.DataGridViewTextBoxColumn dataGridViewTextBoxColumn3; + private System.Windows.Forms.ToolStripDropDownButton toolStripDropDownButton1; + private System.Windows.Forms.ToolStripMenuItem addentrieToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem reloadToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem modifyToolStripMenuItem1; + private System.Windows.Forms.ToolStripMenuItem queryToolStripMenuItem; } } diff --git a/Superbuchhaltung/Forms/Form1.cs b/Superbuchhaltung/Forms/Form1.cs index 94958d5..e63f086 100644 --- a/Superbuchhaltung/Forms/Form1.cs +++ b/Superbuchhaltung/Forms/Form1.cs @@ -21,13 +21,14 @@ namespace Superbuchhaltung private void Form1_Load(object sender, EventArgs e) { - //PH.Visible = false; + P.Visible = true; Reloadview(); } private void Changeview() { PH.Visible = false; + P.Visible = false; } private void Homebtn_Click(object sender, EventArgs e) @@ -35,6 +36,7 @@ namespace Superbuchhaltung Changeview(); PH.Visible = true; Selection = 0; + Reloadview(); } private void DataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) @@ -45,17 +47,16 @@ namespace Superbuchhaltung private void Kat0btn_Click(object sender, EventArgs e) { Changeview(); + P.Visible = true; + Pdatagridview.Visible = true; Selection = 1; + Reloadview(); } private void ToolStripMenuItem1_Click(object sender, EventArgs e) { - Addentrie f = new Addentrie(); - f.Show(); } - private void Timer1_Tick(object sender, EventArgs e) - { - } + private void ToolStrip1_ItemClicked(object sender, ToolStripItemClickedEventArgs e) { @@ -76,16 +77,60 @@ namespace Superbuchhaltung string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + i + ".txt"); foreach (string f in file) { + if (f.Length < 4) continue; PHdataview.Rows.Add(f.Split(';')); - } } } + else + { + string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + Selection + ".txt"); + foreach (string f in file) + { + PHdataview.Rows.Add(f.Split(';')); + } + } } private void ModifyToolStripMenuItem_Click(object sender, EventArgs e) { } + + private void AddentrieToolStripMenuItem_Click(object sender, EventArgs e) + { + Addentrie f = new Addentrie(); + f.Show(); + } + + private void ReloadToolStripMenuItem_Click(object sender, EventArgs e) + { + Reloadview(); + } + + private void QueryToolStripMenuItem_Click(object sender, EventArgs e) + { + Forms.Prompts.Query q = new Forms.Prompts.Query(); + q.Show(); + } + public void Search(List result) + { + Main m = new Main(); + Changeview(); + PH.Visible = true; + m.PHdataview.Rows.Clear(); + Console.WriteLine(result.Count); + for (int i = 0; i < result.Count; i++) + { + Console.WriteLine(result.ElementAt(i)); + PHdataview.Rows.Add(result.ElementAt(i).Split(';')); + } + } + + private void ModifyToolStripMenuItem1_Click(object sender, EventArgs e) + { + Forms.Prompts.Modify M = new Forms.Prompts.Modify(); + M.Show(); + } } } diff --git a/Superbuchhaltung/Forms/Form1.resx b/Superbuchhaltung/Forms/Form1.resx index c822201..be672b6 100644 --- a/Superbuchhaltung/Forms/Form1.resx +++ b/Superbuchhaltung/Forms/Form1.resx @@ -130,6 +130,21 @@ 16, 13 + + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 + YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAIDSURBVDhPpZLrS5NhGMb3j4SWh0oRQVExD4gonkDpg4hG + YKxG6WBogkMZKgPNCEVJFBGdGETEvgwyO9DJE5syZw3PIlPEE9pgBCLZ5XvdMB8Ew8gXbl54nuf63dd9 + 0OGSnwCahxbPRNPAPMw9Xpg6ZmF46kZZ0xSKzJPIrhpDWsVnpBhGkKx3nAX8Pv7z1zg8OoY/cITdn4fw + bf/C0kYAN3Ma/w3gWfZL5kzTKBxjWyK2DftwI9tyMYCZKXbNHaD91bLYJrDXsYbrWfUKwJrPE9M2M1Oc + VzOOpHI7Jr376Hi9ogHqFIANO0/MmmmbmSmm9a8ze+I4MrNWAdjtoJgWcx+PSzg166yZZ8xM8XvXDix9 + c4jIqFYAjoriBV9AhEPv1mH/sonogha0afbZMMZz+yreTGyhpusHwtNNCsA5U1zS4BLxzJIfg299qO32 + Ir7UJtZfftyATqeT+8o2D8JSjQrAJblrncYL7ZJ2+bfaFnC/1S1NjL3diRat7qrO7wLRP3HjWsojBeCo + mDEo5mNjuweFGvjWg2EBhCbpkW78htSHHwRyNdmgAFzPEee2iFkzayy2OLXzT4gr6UdUnlXrullsxxQ+ + kx0g8BTA3aZlButjSTyjODq/WcQcW/B/Je4OQhLvKQDnzN1mp0nnkvAhR8VuMzNrpm1mpjgkoVwB/v8D + TgDQASA1MVpwzwAAAABJRU5ErkJggg== + + iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 @@ -145,7 +160,13 @@ TgDQASA1MVpwzwAAAABJRU5ErkJggg== - - 140, 13 + + True + + + True + + + True \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs b/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs index 453d79f..41ae28a 100644 --- a/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs +++ b/Superbuchhaltung/Forms/Prompts/Addentrie.Designer.cs @@ -85,6 +85,7 @@ this.Kontolabel2.Size = new System.Drawing.Size(100, 23); this.Kontolabel2.TabIndex = 5; this.Kontolabel2.Text = "Kontoname"; + this.Kontolabel2.Click += new System.EventHandler(this.Kontolabel2_Click); // // Addentrie // diff --git a/Superbuchhaltung/Forms/Prompts/Addentrie.cs b/Superbuchhaltung/Forms/Prompts/Addentrie.cs index 36076bc..b528775 100644 --- a/Superbuchhaltung/Forms/Prompts/Addentrie.cs +++ b/Superbuchhaltung/Forms/Prompts/Addentrie.cs @@ -20,12 +20,12 @@ namespace Superbuchhaltung private void Bestätigungsbutton_Click(object sender, EventArgs e) { - string[] write = { Kontonummerbox.Text + ";" +Kontonamebox.Text}; + string[] write = { Kontonummerbox.Text + ";" +Kontonamebox.Text + '\n'}; if (!Directory.Exists(@"C:\Users\Public\TestFolder\")) { Directory.CreateDirectory(@"C:\Users\Public\TestFolder"); } string fi = File.ReadAllText(@"C:\Users\Public\TestFolder\" + Kontonummerbox.Text.Substring(0, 1) + @".txt"); - if (fi.IndexOf(Kontonummerbox.Text) != 0) { + if (fi.Contains(Kontonummerbox.Text)) { if (MessageBox.Show("Der Kontonummer Existiert bereits!\nWollen sie diese überschreiben?", "Konto existiert bereits",MessageBoxButtons.YesNo, MessageBoxIcon.Error) == DialogResult.No) goto goback; int index = fi.IndexOf(Kontonummerbox.Text); @@ -61,5 +61,10 @@ namespace Superbuchhaltung { } + + private void Kontolabel2_Click(object sender, EventArgs e) + { + + } } } diff --git a/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs b/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs index 770ed67..b29fc04 100644 --- a/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs +++ b/Superbuchhaltung/Forms/Prompts/Modify.Designer.cs @@ -28,10 +28,18 @@ /// private void InitializeComponent() { - this.components = new System.ComponentModel.Container(); + this.SuspendLayout(); + // + // Modify + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(800, 450); + this.Name = "Modify"; this.Text = "Modify"; + this.Load += new System.EventHandler(this.Modify_Load); + this.ResumeLayout(false); + } #endregion diff --git a/Superbuchhaltung/Forms/Prompts/Modify.cs b/Superbuchhaltung/Forms/Prompts/Modify.cs index d0d5c30..3318b14 100644 --- a/Superbuchhaltung/Forms/Prompts/Modify.cs +++ b/Superbuchhaltung/Forms/Prompts/Modify.cs @@ -16,5 +16,10 @@ namespace Superbuchhaltung.Forms.Prompts { InitializeComponent(); } + + private void Modify_Load(object sender, EventArgs e) + { + + } } } diff --git a/Superbuchhaltung/Forms/Prompts/Modify.resx b/Superbuchhaltung/Forms/Prompts/Modify.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Modify.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Query.Designer.cs b/Superbuchhaltung/Forms/Prompts/Query.Designer.cs new file mode 100644 index 0000000..d26e575 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Query.Designer.cs @@ -0,0 +1,121 @@ +namespace Superbuchhaltung.Forms.Prompts +{ + partial class Query + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.Suchebtn = new System.Windows.Forms.Button(); + this.Suchen = new System.Windows.Forms.TextBox(); + this.label1 = new System.Windows.Forms.Label(); + this.KUHL = new System.Windows.Forms.DataGridView(); + this.Kontoname = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.KontoNummer = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.KUHL)).BeginInit(); + this.SuspendLayout(); + // + // Suchebtn + // + this.Suchebtn.Location = new System.Drawing.Point(132, 30); + this.Suchebtn.Name = "Suchebtn"; + this.Suchebtn.Size = new System.Drawing.Size(75, 23); + this.Suchebtn.TabIndex = 0; + this.Suchebtn.Text = "button1"; + this.Suchebtn.UseVisualStyleBackColor = true; + this.Suchebtn.Click += new System.EventHandler(this.Suchebtn_Click); + // + // Suchen + // + this.Suchen.Location = new System.Drawing.Point(11, 31); + this.Suchen.Name = "Suchen"; + this.Suchen.Size = new System.Drawing.Size(100, 22); + this.Suchen.TabIndex = 1; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(8, 11); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(56, 17); + this.label1.TabIndex = 2; + this.label1.Text = "Suchen"; + this.label1.Click += new System.EventHandler(this.Label1_Click); + // + // KUHL + // + this.KUHL.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.KUHL.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.Kontoname, + this.KontoNummer}); + this.KUHL.Location = new System.Drawing.Point(12, 59); + this.KUHL.Name = "KUHL"; + this.KUHL.RowHeadersWidth = 51; + this.KUHL.RowTemplate.Height = 24; + this.KUHL.Size = new System.Drawing.Size(1220, 456); + this.KUHL.TabIndex = 3; + // + // Kontoname + // + this.Kontoname.HeaderText = "Kname"; + this.Kontoname.MinimumWidth = 6; + this.Kontoname.Name = "Kontoname"; + this.Kontoname.Width = 125; + // + // KontoNummer + // + this.KontoNummer.HeaderText = "Kontonummer"; + this.KontoNummer.MinimumWidth = 6; + this.KontoNummer.Name = "KontoNummer"; + this.KontoNummer.Width = 125; + // + // Query + // + this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1233, 516); + this.Controls.Add(this.KUHL); + this.Controls.Add(this.label1); + this.Controls.Add(this.Suchen); + this.Controls.Add(this.Suchebtn); + this.Name = "Query"; + this.Text = "Query"; + this.Load += new System.EventHandler(this.Query_Load); + ((System.ComponentModel.ISupportInitialize)(this.KUHL)).EndInit(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Button Suchebtn; + private System.Windows.Forms.TextBox Suchen; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.DataGridView KUHL; + private System.Windows.Forms.DataGridViewTextBoxColumn Kontoname; + private System.Windows.Forms.DataGridViewTextBoxColumn KontoNummer; + } +} \ No newline at end of file diff --git a/Superbuchhaltung/Forms/Prompts/Query.cs b/Superbuchhaltung/Forms/Prompts/Query.cs new file mode 100644 index 0000000..14a15ac --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Query.cs @@ -0,0 +1,63 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.IO; + +namespace Superbuchhaltung.Forms.Prompts +{ + public partial class Query : Form + { + public List result = new List(); + public Query() + { + InitializeComponent(); + } + + private void Label1_Click(object sender, EventArgs e) + { + + } + + private void Suchebtn_Click(object sender, EventArgs e) + { + result.Clear(); + KUHL.Rows.Clear(); + if (Suchen.Text.Length != 0) + { + for (int i = 0; i < 10; i++) + { + string[] file = File.ReadAllLines(@"C:\Users\Public\TestFolder\" + i + ".txt"); + foreach (string s in file) + { + if (s.Contains(Suchen.Text)) + { + result.Add(s); + KUHL.Rows.Add(s.Split(';')); + } + } + } + Console.WriteLine(result.Count()); + if (result.Count != 0) + { + Main m = new Main(); + //m.Search(result); + } + } + else + { + return; + } + } + + private void Query_Load(object sender, EventArgs e) + { + + } + } +} diff --git a/Superbuchhaltung/Forms/Prompts/Query.resx b/Superbuchhaltung/Forms/Prompts/Query.resx new file mode 100644 index 0000000..abaa125 --- /dev/null +++ b/Superbuchhaltung/Forms/Prompts/Query.resx @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + True + + + True + + \ No newline at end of file diff --git a/Superbuchhaltung/Superbuchhaltung.csproj b/Superbuchhaltung/Superbuchhaltung.csproj index 4c40bf4..4813f11 100644 --- a/Superbuchhaltung/Superbuchhaltung.csproj +++ b/Superbuchhaltung/Superbuchhaltung.csproj @@ -64,6 +64,12 @@ Modify.cs + + Form + + + Query.cs + @@ -72,6 +78,12 @@ Addentrie.cs + + Modify.cs + + + Query.cs + ResXFileCodeGenerator Resources.Designer.cs diff --git a/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe index f4ca000..65346b8 100644 Binary files a/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe and b/Superbuchhaltung/bin/Debug/Superbuchhaltung.exe differ diff --git a/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb b/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb index 26d0c6a..67c5c4e 100644 Binary files a/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb and b/Superbuchhaltung/bin/Debug/Superbuchhaltung.pdb differ diff --git a/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache index 33b15f3..7afbf72 100644 Binary files a/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and b/Superbuchhaltung/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Forms.Prompts.Query.resources b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Forms.Prompts.Query.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Forms.Prompts.Query.resources differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources index 511998e..83a253d 100644 Binary files a/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.Main.resources differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache index 54cfaeb..5d26040 100644 --- a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache +++ b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.CoreCompileInputs.cache @@ -1 +1 @@ -cfd3e8f2fcc198ad011582ee7adf4d72bf319ead +5ae62a74ce4efe60857c52046e40766bd46b5d81 diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt index e71e5ee..d6b5e45 100644 --- a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt +++ b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.FileListAbsolute.txt @@ -20,3 +20,15 @@ C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Super C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.CoreCompileInputs.cache C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.exe C:\Users\stefa\Documents\Gitgh\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.pdb +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe.config +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.exe +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\bin\Debug\Superbuchhaltung.pdb +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csprojAssemblyReference.cache +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Main.resources +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Addentrie.resources +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Properties.Resources.resources +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.GenerateResource.cache +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.csproj.CoreCompileInputs.cache +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.exe +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.pdb +C:\Users\Stefan Kössner\Documents\GitHub\Superbuchhaltung\Superbuchhaltung\obj\Debug\Superbuchhaltung.Forms.Prompts.Query.resources diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache index bff4414..485d188 100644 Binary files a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csproj.GenerateResource.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache index f088e62..33eea96 100644 Binary files a/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.csprojAssemblyReference.cache differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe b/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe index f4ca000..65346b8 100644 Binary files a/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.exe differ diff --git a/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb b/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb index 26d0c6a..67c5c4e 100644 Binary files a/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb and b/Superbuchhaltung/obj/Debug/Superbuchhaltung.pdb differ