一个开源的企业级,深度定制用户控件组件库,提供丰富的 WinForms UI 组件和工具。An open-source, enterprise-grade, deeply customizable user control component library, providing a rich set of WinForms UI components and tools.
$ dotnet add package Erp.ToolkitAn open-source, enterprise-grade, deeply customizable user control component library, providing a rich set of WinForms UI components and tools.
This package is an extension for the ERP 2.0 project, aimed at simplifying the display of master-detail structured data within projects and providing common basic functionalities.

# Pack the project
dotnet pack --configuration Release
# Specify output directory
dotnet pack --configuration Release --output ./nupkgs
# Upload to NuGet server using dotnet CLI
dotnet nuget push ./nupkgs/Erp.Toolkit.0.3.6.nupkg --api-key API_KEY --source https://api.nuget.org/v3/index.json
Install via NuGet:
Install-Package Erp.Toolkit
| Quick Start | Full Example | NuGet Package |
|---|
// Create control
private Erp.Toolkit.Controls.Dgv dgv = new Erp.Toolkit.Controls.Dgv();
// Sample data
var sampleData = GenerateSampleData();
// Render on UI layer
Controls.Add(dgv);
dgv.Dock = DockStyle.Fill;
// Populate data for the top-level master view
dgv.FillList(sampleData, this.Name);
// Set theme
dgv.ThemeStyle = ThemeStyle.BlueTheme;
// Custom user menu or toolbar
List<DgvUserContextMenuStripConfig> menuConfigs = new List<DgvUserContextMenuStripConfig>
{
new DgvUserContextMenuStripConfig
{
MenuText = "Detailed Profile",
Target = MenuShowTarget.ToolStrip | MenuShowTarget.ContextMenuStrip,
Group = 1,
ClickHandler = (senders, es) => {
var winFrom = new WinFormSample();
winFrom.Text = $"View detailed profile for employee {dgv.GetSelectedItemIds()}";
winFrom.ShowDialog();
}
},
};
// Build user menu configuration
dgv.SetUserContextMenu(menuConfigs);
internal class SampleData
{
public int Id { get; set; }
public string Name { get; set; }
public int Age { get; set; }
public string Department { get; set; }
public string Position { get; set; }
public decimal Salary { get; set; }
public DateTime JoinDate { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public bool IsActive { get; set; }
public string Status => IsActive ? "Active" : "Inactive";
public int WorkYears => DateTime.Now.Year - JoinDate.Year;
}
private List<SampleData> GenerateSampleData()
{
return new List<SampleData>
{
new SampleData
{
Id = 1,
Name = "Zhang Ming",
Age = 28,
Department = "Technology Department",
Position = "Senior Software Engineer",
Salary = 15000m,
JoinDate = new DateTime(2020, 3, 15),
Email = "zhangming@doipc.com",
Phone = "13800138001",
IsActive = true
},
new SampleData
{
Id = 2,
Name = "Li Fang",
Age = 32,
Department = "Human Resources Department",
Position = "HR Manager",
Salary = 12000m,
JoinDate = new DateTime(2019, 7, 22),
Email = "lifang@doipc.com",
Phone = "13900139002",
IsActive = true
},
new SampleData
{
Id = 3,
Name = "Wang Qiang",
Age = 25,
Department = "Marketing Department",
Position = "Marketing Specialist",
Salary = 8000m,
JoinDate = new DateTime(2022, 1, 10),
Email = "wangqiang@doipc.com",
Phone = "13700137003",
IsActive = true
}
};
}
[!TIP] Erp.Toolkit - Making enterprise development less complex!
- A toolset focused on ERP scenarios
- Developed based on real enterprise requirements
- Proven in production environments
- Continuously updated and maintained
- Free and open source, licensed under Apache-2.0 license, commercial use welcome
- Please submit
Issuesfor any problems;PRsare welcome for known errorsErp.Toolkit: A powerful set of tools and components for building ERP systems efficiently.
@zhangsanbin :+1: This project looks great - it's ready to pull!
- I have reviewed the code changes.