标签:
//声明函数 @helper GetWeek(int week) { switch (week) { case 0: @:星期天 break; case 1: @:星期一 break; case 2: @:星期二 break; case 3: @:星期三 break; case 4: @:星期四 break; case 5: @:星期五 break; case 6: @:星期六 break; default: @:星期天 break; } } //调用函数 <label for="radio1" class="plan_leixing02">@GetWeek(appiontweek) @appointtime.StartTime.ToString()-@appointtime.EndTime.ToString()</label>
//自定义函数@functions @functions{ public IHtmlString Get(int count) { string result = ""; if (count == 0) { result = "不存在"; } else { result = "存在"; } return new HtmlString(result); } } @Get(0) //调用的自定义函数
标签:
原文地址:http://www.cnblogs.com/tianxiaziwei/p/5021030.html