using trakker.Forms;
using trakker.Models;
namespace trakker
{
public partial class MainForm : Form
{
///
/// Initializes a new instance of the class.
/// Sets up the form's controls and event handlers by calling
/// which is generated by the designer.
///
public MainForm()
{
InitializeComponent();
}
///
/// Handles the Click event of the Exit menu item. When invoked, this
/// method terminates the application.
///
/// The source of the event.
/// Event data associated with the click event.
private void MainForm_Exit_MenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void button1_Click(object sender, EventArgs e)
{
Client client = new Client();
client.ClientId = Guid.NewGuid().ToString();
var dialog = new ClientForm(client);
dialog.ShowDialog(this);
client = dialog.Client;
MessageBox.Show($"Client Name: {client.Name}\nCompany: {client.Company}\nEmail: {client.Email}\nPhone: {client.Phone}\nAddress: {client.Address}\nIs Active: {client.IsActive}\nNotes: {client.Notes}");
}
}
}