It's going to be a long one so apologies in advance. In an ASP.NET MVC application I am writing a partial control that is a search panel. Now this panel has
I have defined a View model as follows
public class SearchControlModel
{
public List<Class> Classes {get; set;}
public List<Year> Years { get; set; }
public List<Indicator> Indicators { get; set; }
}
Where my entities are:
public class Class
{
public int classID { get; set; }
public Nullable<int> grade { get; set; }
public string classname { get; set; }
public virtual ICollection<Student> Students { get; set; }
}
public class Indicator
{
public int IndicatorID { get; set; }
public string IndicatorDescription { get; set; }
public virtual ICollection<Student> Students { get; set; }
}
My questions are:
What would be the right controls to display class and indicators (grid/table that appears as a drop-down)
Do I use the ado.net entities directly or through stored procedures?
If I use stored procedures, I will have to define a different entity that has only the specific properties that the stored procedure is dealing with or is there another way?
On the View (cshtml file) how do I use these properties to bind with drop-down or table eg something like:
In short what is the best approach to go about it?
Here is a picture to clarify
我正在使用bootstrap-multiselect自定义控件,但仍然想知道它是否能够在其中添加详细信息/相邻列
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.