Skip to content

Auto generate an integrated crud UI in Umbraco for a db table based on a petapoco poco

Notifications You must be signed in to change notification settings

camaya/UIOMatic

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

UI-O-Matic

Build status Documentation Status NuGet release Our Umbraco project page Chat on Gitter

Click here to lend your support to: UI-O-Matic Development and make a donation at pledgie.com !

Auto generate an integrated crud UI in Umbraco for a db table based on a petapoco poco

Implement an interface and decorate your class and properties with some additional attributes.

Example

If you have the following db table

CREATE TABLE [People] (
  [Id] int IDENTITY (1,1) NOT NULL
, [FirstName] nvarchar(255) NOT NULL
, [LastName] nvarchar(255) NOT NULL
, [Picture] nvarchar(255) NOT NULL
);

This class

[UIOMaticAttribute("People","icon-users","icon-user")]
[TableName("People")]
public class Person: IUIOMaticModel
{
    public Person() { }

    [UIOMaticIgnoreField]
    [PrimaryKeyColumn(AutoIncrement = true)]
    public int Id { get; set; }

    [UIOMaticField("First name","Enter the persons first name")]
    public string FirstName { get; set; }

    [UIOMaticField("Last name", "Enter the persons last name")]
    public string LastName { get; set; }

    [UIOMaticField("Picture", "Select a picture", View = "file")]
    public string Picture { get; set; }

    public override string ToString()
    {
        return FirstName + " " + LastName;
    }

    public IEnumerable<Exception> Validate()
    {
        var exs = new List<Exception>();

        if(string.IsNullOrEmpty(FirstName))
            exs.Add(new Exception("Please provide a value for first name"));

        if (string.IsNullOrEmpty(LastName))
            exs.Add(new Exception("Please provide a value for last name"));


        return exs;
    }
}`

Will generate the following UI

Documentation

For docs please go to http://uiomatic.readthedocs.org/

Presentation

For the quick intro check http://slides.com/timgeyssens/uiomatic#/

Test site

Backoffice credentials:

About

Auto generate an integrated crud UI in Umbraco for a db table based on a petapoco poco

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.4%
  • HTML 10.4%
  • CSS 6.9%
  • Classic ASP 6.1%
  • C# 2.3%
  • XSLT 0.9%