摘要: 在Share/EditorTemplates中新增View,名为Enum.cstml内容如下 1 @using MvcApp.Infrastructure 2 @model Enum 3 4 @Html.DropDownListFor(m => m, Enum.GetValues(Model.GetType()) 5 .Cast<Enum>() 6 .Select(m => { 7 string enumVal = Enum.GetName(Model.GetType(), m); 8 return new SelectListItem() 9 {10 Sel... 阅读全文
posted @ 2012-03-11 09:46 mayamoon 阅读(520) 评论(0) 推荐(0)
摘要: 1.分页扩展方法1.1定义 1 public static MvcHtmlString PageLinks(this HtmlHelper html, 2 PagingInfo pagingInfo, 3 Func<int, string> pageUrl) { 4 StringBuilder result = new StringBuilder(); 5 for (int i = 1; i <= pagingInfo.TotalPages; i++) { 6 TagBuilder tag = new TagBuilder("a"); // Constru 阅读全文
posted @ 2012-03-03 13:22 mayamoon 阅读(184) 评论(0) 推荐(0)
摘要: 效果控件XAML代码<UserControl xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compat 阅读全文
posted @ 2011-10-07 00:49 mayamoon 阅读(743) 评论(1) 推荐(2)
摘要: 效果图前台代码<UserControl x:Class="Hotellight.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://sch 阅读全文
posted @ 2011-10-06 13:23 mayamoon 阅读(832) 评论(1) 推荐(1)
摘要: Silverlight_XPS Reader 阅读全文
posted @ 2010-09-30 09:26 mayamoon 阅读(1117) 评论(0) 推荐(0)