dasboard form
using System;
using [Link];
namespace FarmManagementSystem
{
public partial class DashboardForm : Form
{
private string _username;
public DashboardForm(string username)
{
InitializeComponent();
_username = username;
[Link] = $"Welcome, {_username}!";
}
private void btnCropManagement_Click(object sender, EventArgs e)
{
// Open Crop Management form
CropManagementForm cropForm = new CropManagementForm();
[Link](); // Use Show() if you want non-modal
}
private void btnLivestock_Click(object sender, EventArgs e)
{
// Open Livestock Management form
LivestockForm livestockForm = new LivestockForm();
[Link](); // Use Show() if you want non-modal
}
private void btnReports_Click(object sender, EventArgs e)
{
[Link]("Navigate to Reports Module", "Info");
// TODO: Open Reports form
}
private void btnLogout_Click(object sender, EventArgs e)
{
var confirm = [Link]("Are you sure you want to logout?",
"Confirm Logout", [Link]);
if (confirm == [Link])
{
[Link]();
// Optionally, show login form again
}
}
}
internal class LivestockManagementForm
{
}
}
dashboarddesigner
using [Link];
namespace FarmManagementSystem
{
partial class DashboardForm
{
private [Link] components = null;
private Label lblWelcome;
private [Link] btnCropManagement;
private [Link] btnLivestock;
private Button btnReports;
private Button btnLogout;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
[Link]();
}
[Link](disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link]();
//
// lblWelcome
//
[Link] = new [Link]("Segoe UI", 14F,
[Link]);
[Link] = new [Link](12, 20);
[Link] = "lblWelcome";
[Link] = new [Link](360, 30);
[Link] = 0;
[Link] = "Welcome, User!";
[Link] =
[Link];
//
// btnCropManagement
//
[Link] = new [Link](50, 70);
[Link] = "btnCropManagement";
[Link] = new [Link](0, 0);
[Link] = 0;
[Link] = "Crop Management";
[Link] = true;
[Link] += new
[Link](this.btnCropManagement_Click);
//
// btnLivestock
//
[Link] = new [Link](50, 120);
[Link] = "btnLivestock";
[Link] = new [Link](280, 40);
[Link] = 2;
[Link] = "Livestock Management";
[Link] = true;
[Link] += new
[Link](this.btnLivestock_Click);
//
// btnReports
//
[Link] = new [Link](50, 170);
[Link] = "btnReports";
[Link] = new [Link](280, 40);
[Link] = 3;
[Link] = "Reports";
[Link] = true;
[Link] += new
[Link](this.btnReports_Click);
//
// btnLogout
//
[Link] = new [Link](50, 220);
[Link] = "btnLogout";
[Link] = new [Link](280, 40);
[Link] = 4;
[Link] = "Logout";
[Link] = true;
[Link] += new [Link](this.btnLogout_Click);
//
// btnCrop
//
[Link] = new [Link](50, 70);
[Link] = "btnCrop";
[Link] = new [Link](280, 40);
[Link] = 1;
[Link] = "Crop Management";
[Link] = true;
//
// DashboardForm
//
[Link] = new [Link](384, 291);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link] =
[Link];
[Link] = false;
[Link] = "DashboardForm";
[Link] =
[Link];
[Link](false);
}
private [Link] btnCrop;
}
}
using [Link];
namespace FarmManagementSystem
{
partial class DashboardForm
{
private [Link] components = null;
private Label lblWelcome;
private [Link] btnCropManagement;
private [Link] btnLivestock;
private Button btnReports;
private Button btnLogout;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
[Link]();
}
[Link](disposing);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link] = new [Link]();
[Link]();
//
// lblWelcome
//
[Link] = new [Link]("Segoe UI", 14F,
[Link]);
[Link] = new [Link](12, 20);
[Link] = "lblWelcome";
[Link] = new [Link](360, 30);
[Link] = 0;
[Link] = "Welcome, User!";
[Link] =
[Link];
//
// btnCropManagement
//
[Link] = new [Link](50, 70);
[Link] = "btnCropManagement";
[Link] = new [Link](0, 0);
[Link] = 0;
[Link] = "Crop Management";
[Link] = true;
[Link] += new
[Link](this.btnCropManagement_Click);
//
// btnLivestock
//
[Link] = new [Link](50, 120);
[Link] = "btnLivestock";
[Link] = new [Link](280, 40);
[Link] = 2;
[Link] = "Livestock Management";
[Link] = true;
[Link] += new
[Link](this.btnLivestock_Click);
//
// btnReports
//
[Link] = new [Link](50, 170);
[Link] = "btnReports";
[Link] = new [Link](280, 40);
[Link] = 3;
[Link] = "Reports";
[Link] = true;
[Link] += new
[Link](this.btnReports_Click);
//
// btnLogout
//
[Link] = new [Link](50, 220);
[Link] = "btnLogout";
[Link] = new [Link](280, 40);
[Link] = 4;
[Link] = "Logout";
[Link] = true;
[Link] += new [Link](this.btnLogout_Click);
//
// btnCrop
//
[Link] = new [Link](50, 70);
[Link] = "btnCrop";
[Link] = new [Link](280, 40);
[Link] = 1;
[Link] = "Crop Management";
[Link] = true;
//
// DashboardForm
//
[Link] = new [Link](384, 291);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link]([Link]);
[Link] =
[Link];
[Link] = false;
[Link] = "DashboardForm";
[Link] =
[Link];
[Link](false);
}
private [Link] btnCrop;
}
}
private void btnCropManagement_Click(object sender, EventArgs e)
{
// Open Crop Management form
CropForm CropForm = new CropForm();
[Link](); // Use Show() if you want non-modal
}
private void btnLivestock_Click(object sender, EventArgs e)
{
// Open Livestock Management form
LivestockForm livestockForm = new LivestockForm();
[Link](); // Use Show() if you want non-modal
}