Skip to content

zhangsanbin/Erp.Toolkit

Repository files navigation

Erp.Toolkit

License Docker GitHub commit activity Pulls NuGet Version NuGet Downloads

English | 中文

An 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.

Features

  • High-performance DataGridView control
  • Multi-target framework support (.NET Framework 4.6.2+ and .NET Core 3.1+)
  • Multi-language support ( zh-CN, zh-TW, en-US, de-DE, fr-FR, ja-JP )
  • Rich theme system
  • Conditional styling and formatting
  • Master-detail grid views
  • Customizable column configuration
  • Statistics, printing, and exporting
  • Built-in search and filtering capabilities
  • More enterprise-level UI components

Supported Frameworks

  • .NET Framework 4.6.2, 4.7.2, 4.8
  • .NET Core 3.1
  • .NET 6.0, 7.0, 8.0 (Windows)

Preview

Preview

How to Pack

# 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

Installation

Install via NuGet:

Install-Package Erp.Toolkit

How to Use

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);

Sample Data

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
        }
    };
}

Sample Code

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 Issues for any problems; PRs are welcome for known errors

Erp.Toolkit: A powerful set of tools and components for building ERP systems efficiently.


@zhangsanbin 👍 This project looks great - it's ready to pull!

  • I have reviewed the code changes.

About

一个开源的企业级,深度定制用户控件组件库,提供丰富的 WinForms UI 组件和工具。An open-source, enterprise-grade, deeply customizable user control component library, providing a rich set of WinForms UI components and tools.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages