Skip to content

Instantly share code, notes, and snippets.

@d630
d630 / Form1.cs
Created July 5, 2018 22:09
Drag and Drop 1 (Windows Forms)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
@d630
d630 / sql.md
Last active July 5, 2018 00:26
Tag 22:
  1. TODO

    • Kreuztabelle, Kartesisches Produkt, cross join
    • The LEFT JOIN keyword returns all records from the left table (table1), and the matched records from the right table (table2). The result is NULL from the right side, if there is no match. The RIGHT JOIN keyword returns all records from the right table (table2), and the matched records from the left table (table1). The result is NULL from the left side, when there is no match.
  • The INNER JOIN keyword selects records that have matching values in both
@d630
d630 / Auftrag.cs
Last active July 6, 2018 01:34
Übung 3: C# + Windows Forms + MySQL (without DataGridView and MySqlDataAdapter)
namespace IHK2
{
public class Auftrag
{
public Auftrag(int a_id, string nummer, double umsatz, int v_id)
{
this.A_id = a_id;
this.Nummer = nummer;
this.Umsatz = umsatz;
this.V_id = v_id;
@d630
d630 / Form1.cs
Created July 3, 2018 03:10
Windows Forms + System.Xml
using System;
using System.Collections.Generic;
using System.Windows.Forms;
using System.Xml;
namespace XmlExp
{
public partial class Form1 : Form
{
public const string XML_DATA = "http://www.ecb.int/stats/eurofxref/eurofxref-daily.xml";
@d630
d630 / Program.cs
Last active July 4, 2018 23:03
Tag 16: r/w
using System;
using System.Collections.Generic;
using System.IO;
namespace person
{
class Person
{
public Person(string nachname, string vorname)
{
@d630
d630 / q.sql
Last active July 4, 2018 23:40
Tag 17
-- 1)
SELECT *
FROM mitarbeiter
WHERE tagesarbeitszeit IS NULL OR tagesarbeitszeit < 7;
-- 2)
UPDATE mitarbeiter
SET tagesarbeitszeit = tagesarbeitszeit + tagesarbeitszeit * 0.10
WHERE tagesarbeitszeit IS NOT NULL;
@d630
d630 / DB.cs
Last active July 6, 2018 01:33
Übung 2: C# + Windows Forms + MySQL + XML (without DataGridView and MySqlDataAdapter)
using System;
using System.Collections.Generic;
using MySql.Data.MySqlClient;
using System.Windows.Forms;
// TODO: avoid injections
// TODO: Better exception handling
namespace PersonalDB
{