-
Notifications
You must be signed in to change notification settings - Fork 0
/
inkommandeLeverans.cs
55 lines (50 loc) · 1.88 KB
/
inkommandeLeverans.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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 MySql.Data.MySqlClient;
using NLog;
namespace Produktionslager
{ /// <summary>
/// Programmerare:Ted Olsson
/// Denna Klass visar en Lagerstatusen på komponenter, samt att man ska kunna öka antalet på komponenter vid leverans
/// och kunna ta bort en komponent.
/// </summary>
public partial class inkommandeLeverans : Form
{
private static Logger logger = LogManager.GetCurrentClassLogger();
private string _query = "SELECT * FROM db30.h18edgbo_KomponentLager";
public inkommandeLeverans()
{
InitializeComponent();
SQLHelp.LäsaData(_query, ref leveransDataGridView);
}
private void LäggTillMängdButton_Click(object sender, EventArgs e)
{
// Hänvisar till Klassen antalForm för att kunna öka antalet på en komponent.
antalForm antalForm = new antalForm(leveransDataGridView, "h18edgbo_KomponentLager");
antalForm.Show();
}
private void avbrytButton_Click(object sender, EventArgs e)
{
Close();
}
private void taBortButton_Click(object sender, EventArgs e)
{
if (MessageBox.Show("Är du säker på att du vill ta bort?", "Fråga", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
{
SQLHelp.Delete(leveransDataGridView, "h18edgbo_KomponentLager");
SQLHelp.LäsaData(_query, ref leveransDataGridView);
}
}
private void exitToolStripMenuItem_Click(object sender, EventArgs e)
{
Close();
}
}
}