@using System.Text @using ZoomLa.Common @using ZoomLa.BLL @using ZoomLa.Model @using ZoomLa.Components @using System.Data @using ZoomLa.BLL.Content @model ZoomLaCMS.Models.Field.VM_FieldModel @{ // 下拉文件 string Name = Model.fieldMod.FieldName; string path = function.VToP(Model.fieldMod.Content); FieldModel model = new FieldModel(Model.fieldMod.Content); } @functions{ //用于下拉文件 private IHtmlContent bindTemplatefolder(string pathstr, DataRow dr) { DataTable tables = FileSystemObject.GetDirectoryAllInfos(pathstr, FsoMethod.File); string value = ""; if (dr != null&&dr.Table.Columns.Contains(Model.fieldMod.FieldName)) { value = DataConverter.CStr(dr[Model.fieldMod.FieldName]); } string Result = ""; for (int i = 0; i < tables.Rows.Count; i++) { if (string.IsNullOrEmpty(DataConverter.CStr(tables.Rows[i]["type"]))) { continue; } string path = tables.Rows[i]["rname"].ToString(); if (path.IndexOf(".svn") != -1) { continue; } if (path.Substring(0, 5) == "style") { continue; } path = function.PToV(path); Result += ""; Result += string.Format("", path, (path.Equals(value) ? "selected='selected'" : ""), path); } tables.Dispose(); return MvcHtmlString.Create(Result); } }