38 lines
992 B
C#
38 lines
992 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Data.SqlClient;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace InventoryTest
|
|
{
|
|
public partial class Form1 : Form
|
|
{
|
|
private static string ConnectionString { get; } = "Server=DESKTOP-HJES64T;Database=Inventory;Integrated Security=true;";
|
|
|
|
public Form1()
|
|
{
|
|
InitializeComponent();
|
|
|
|
ManageCategoriesToolStripMenuItem.Click += ShowCategoryManagerForm;
|
|
exitToolStripMenuItem.Click += ExitToolStripMenuItem_Click;
|
|
}
|
|
|
|
private void ExitToolStripMenuItem_Click(object sender, EventArgs e)
|
|
{
|
|
Close();
|
|
}
|
|
|
|
private void ShowCategoryManagerForm(object sender, EventArgs e)
|
|
{
|
|
var form = new CategoryManager(ConnectionString);
|
|
form.ShowDialog();
|
|
}
|
|
}
|
|
}
|