<cite>ismcagdas: </cite> Hi,
Can you check the executed sql query via SQL query profiler ? If you cannot solve the problem, can you send a screenshot of your ListValues database table ?
Thanks but I was able to get past this error. Not sure what I changed :-) but the default GetAll() method started working and returning data. I have got my create, get and update methods working now using the existing design pattern.
I posted a question on the referenced post above, on the Metronic forum and I was asked to post the same question here in this forum.
[http://keenthemes.com/forums/topic/aspnetzero-starter-kit-for-your-next-net-web-application-based-on-metronic/page/2/#post-8571])
I am working on v1.13 of the aspnetzero solution. I want to change the default theme to Layout1 Material theme. I’m tyring to follow the steps described above in post [http://keenthemes.com/forums/topic/aspnetzero-starter-kit-for-your-next-net-web-application-based-on-metronic/#post-6751]). However all of the folders/paths mentioned do not match up with the source code I have. I am using the Asp.Net MPA solution. Can you please provide updated steps to change theme based on the v1.13 solution of aspnetzero?
Thanks!
<cite>ismcagdas: </cite> Hi,
This is the default behaviour of metronic. In order to make a menu item open, we need to add "open" css class to list item. If we do that, menu item is automatically colored.
If you want to change this behaviour, you can use "open" css class instead of "active". But you need to assign "active" css class to selected list item and change the background color for "open" css class to transparent or white.
This problem is only happening with the "custom" menu that I have added for my application. All of the normal menu items that are provided with the template work just fine? Why would the issue not appear on ALL menu items?
One new issue, that is somewhat related. I just created the edit modal for the same custom entity. When the data is loaded into the modal and displayed to the user the textbox value is overlayed by the label text. Once you click on the field the label moves out of the way. I compare my modal to that of "Edit Tenant" and "Edit User" in the ABP solution and my HTML and css classes are all the same. Can someone tell me why this is not working on my modal?
Here is screenshot: [attachment=0:3dchg9pb]Screenshot (29).png[/attachment:3dchg9pb]
I have followed the design pattern of the ABP solution and gotten the index and create functions working for my custom entity "company". I have created all the proper layers with classes as per the design pattern of the ABP template. When the create modal is displayed and the user clicks save without filling in all required fields the JS validation works and highlights two of the four fields. The validation refuses to work for the other two fields.
The PDF document here shows all the relevant code and screenshot: [https://drive.google.com/open?id=0BzbrPy41GhA4SWdEWXZGSHRfbU0])
Can you please guide me to what I am missing and/or why the validation is not working for the other two fields?
Thanks!
Thank you, that resolved the error!
New issue, the repository method GetAll() is NOT returning any data? Am I missing something?
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using Abp.EntityFramework;
using EXLNT.NursingOps17.NursingOps;
namespace EXLNT.NursingOps17.EntityFramework.Repositories
{
public class ListValuesRepository : NursingOps17RepositoryBase<ListValues, int>, IListValuesRepository
{
public ListValuesRepository(IDbContextProvider<NursingOps17DbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public List<ListValues> GetListNameValues(string listName)
{
//In repository methods, we do not deal with create/dispose DB connections, DbContexes and transactions. ABP handles it.
var query = GetAll(); //GetAll() returns IQueryable<T>, so we can query over it.
//var query = Context.Tasks.AsQueryable(); //Alternatively, we can directly use EF's DbContext object.
//var query = Table.AsQueryable(); //Another alternative: We can directly use 'Table' property instead of 'Context.Tasks', they are identical.
//Add some Where conditions...
if (listName.Length != 0)
{
query = query.Where(task => task.ListName == listName);
}
//if (id.HasValue)
//{
// query = query.Where(task => task.Id == id);
//}
return query
.OrderByDescending(task => task.ListValue)
.ToList();
}
}//class
}
Yes. See below.
namespace EXLNT.NursingOps17.NursingOps
{
public interface IListValuesRepository : IRepository<ListValues, int>
{
/// <summary>
/// Gets all list values with <see cref="ListValues.ListName"/> is retrived (Include for EntityFramework, Fetch for NHibernate)
/// filtered by given conditions.
/// </summary>
/// <param name="listName">List name filter. If it's null, not filtered.</param>
/// <returns>List of values by name</returns>
List<ListValues> GetAllByValue(int? listID, string listName);
}
}
This was a one drive sync problem. Please ignore the question.
Here is the repository code:
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using Abp.EntityFramework;
using EXLNT.NursingOps17.NursingOps;
namespace EXLNT.NursingOps17.EntityFramework.Repositories
{
public class ListValuesRepository : NursingOps17RepositoryBase<ListValues, int>, IListValuesRepository
{
protected ListValuesRepository(IDbContextProvider<NursingOps17DbContext> dbContextProvider)
: base(dbContextProvider)
{
}
public List<ListValues> GetAllByValue(int? id, string listName)
{
//In repository methods, we do not deal with create/dispose DB connections, DbContexes and transactions. ABP handles it.
var query = GetAll(); //GetAll() returns IQueryable<T>, so we can query over it.
//Add some Where conditions...
if (listName.Length != 0)
{
query = query.Where(task => task.ListName == listName);
}
if (id.HasValue)
{
query = query.Where(task => task.Id == id);
}
return query
.OrderByDescending(task => task.ListValue)
.ToList();
}
}//class
}
The interface and implementation is on my previous post.