Giter Club home page Giter Club logo

ilaro.admin's People

Contributors

rgonek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ilaro.admin's Issues

Null Pointer Exception

Good morning,

I install Ilaro Admin in a project. This project has a Code First Generate to create de Database and I use EF6. I show the list of entities but when I try to load the page with the data list of one of this entities or try to create a new data I recibe this error.

I try to find a solution by Internet but I couldn't.

I can't undersetand the next instruction (may be I have the problems for this reason):
Notificator in session scope
IEntityService => EntityService

Thanks

Bug: Can't Save an entity with empty DateTime field

Description

So this is easily reproduced at the demo site. The problem is that if Save button clicked for existing entity, and this entity has an empty DateTime field, the entity will not be saved, the DateTime field will be automatically set to 1/1/0001 12:00 AM and the following error will be displayed:

SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.

Reproduction Steps

To reproduce this, go to the following record http://admin.ilaro.net/Admin/Order/Edit/10249 and clear out Shipped Date field, then try to save the entity. The error will be displayed.

Screenshot of the error

Analysis

This error arises in the Ilaro.Admin.Core.EntityRecordCreator class in GetPropertyValue method at the line 40:

33. private static PropertyValue GetPropertyValue(
34. 	Property property,
35. 	IValueProvider valueProvider,
36. 	Func<Property, object> defaultValueResolver = null)
37. {
38. 	var propertyValue = new PropertyValue(property);
39. 
40. 	var value = valueProvider.GetValue(property.Name);
41. 	if (value != null)
42. 	{
43. 		if (property.IsForeignKey && property.TypeInfo.IsCollection)
44. 		{
45. 			propertyValue.Values = value.AttemptedValue
46. 				.Split(',').OfType<object>().ToList();
47. 		}
48. 		else if (property.TypeInfo.DataType == DataType.DateTime)
49. 		{
50. 			propertyValue.Raw = ParseDateTime(property, (string)value.ConvertTo(typeof(string)));
51. 		}
52. 		else
53. 		{
54. 			propertyValue.Raw = value.ConvertTo(
55. 				property.TypeInfo.OriginalType,
56. 				CultureInfo.CurrentCulture);
57. 		}
58. 	}

Peek:
var value = valueProvider.GetValue(property.Name);

Here valueProvider is of type System.Web.Mvc.FormCollection, and GetValue instead of null value (the date is null in the FormCollection itself), returns an empty string. And later on, DateTime.TryParse instead of working with null, is parsing an empty string.

Delete EF context

Delete EF context and use some cool library such as SImple.Data or Massive

Manage Foreign keys

  • When add or edit record display form for foreign key.
  • When display record display text for foreign key.

Any plans to update this library?

I use django in some projects instead of .NET just to use the admin.
With a tool like this I would get rid of django completely.
This project looks great. Is it dead? any plans to continue?

Ilaro not recognize the role

Hi again,

I have another problem. I create a new Issue because I think is better to find a solution for future users. I implement .Net Security Authentication and Authorization. I write a "admin" and "Admin" role. But when I try to enter a Ilaro Admin it not recognize the roles. I can entered only if I cannot use a role restriction.

I can't undersetand the next instruction (may be I have the problems for this reason):
Notificator in session scope
IEntityService => EntityService

Thanks

Readme

Describe how to use Ilaro.Admin.
How to compile etc.
What libraries I used etc.

Validation

Add client side and server side validation based on data annotation

Seting control attributes

For example we have a DateTimePicker which using jquery plugin, and that plugin have some attributes.
Now if we want for example a diffrent date format for each DateTime properties, we need create template for each one, so it needs bit of work for us and code it's become messy.
So we need ability to add propertties for controls.

Core 1

Hello,

Great job ! Do you develop too for core 1 ?

Thanks per advance

How do I use this project with ASP.NET MVC5

When I saw this project, it's pretty much like a life-saver, but unfortunately it supports ASP.NET MVC 4 at highest, please could any one advise me how to integrate it with ASP.NET MVC 5?

Deleting entity record

  • Display more info about deleting entity
  • Display form for delete options
  • Logic for cascade delete
  • Logic for set to null

Available delete options:

  • nothing
  • set null
  • cascade delete
  • ask user

how to use Ilaro.Admin??????

hi.@rgonek
please describe how to use?
i create empty asp.net mvc application and install llaro with nuget command but after that i dont know ,what should i do.
please explain step by step.thanks.

Request to be able to display any field of a related entity

Description

Currently if we have Entity A and Entity B, and Entity A has a field with a Foreign Key relationship to Entity B, in the Results Table of an Entity A, it is possible to display only the ID of an Entity B.

This feature request is about being able to display not just ID of a related entity, but any field, or at least the description, because the ID is generally not very informative.

Example (from the Northwind database):

  1. Entity A = Order
  2. Entity B = Employee
  3. So every order has an employee attached to it
  4. Currently, in the Orders Results Table we can see the Employee Id, which is not very informative
  5. It would be great to be able to display Employee First Name + Employee Last Name
  6. It would also be great for this to be clickable, so the link would bring the user to a related entity Edit Page / View Page
Before After
Before After

Check For templates

Hello @rgonek ,

I really like your project and concept even i just thought to work on such type of projects which you have and i google it and i found your project but now i want to test and also if you need any help may be i can also help you out , but before that i want to know the flow of yours i am doing R&D. May be you can help on below questions:

a) How the Routes are working on Runtime
b) How to set route for particular HTML DOM

I will prepare more questions if i will have an issue .

Thanks for your code , i really like the concept you have.

Best Regards
Praveen Kumar

Use bundles

Start using bundles, and use minimal css and js files, delete all unnecessary files

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.