@using System.Data @using Newtonsoft.Json @using Newtonsoft.Json.Linq @using ZoomLa.Common @model ZoomLa.Model.Design.M_Design_Question @{ DataTable options = JsonConvert.DeserializeObject(Model.QOption); JObject json = JsonConvert.DeserializeObject(Model.QFlag); string type = json["type"].ToString(); int num = DataConverter.CLng(json["num"].ToString()); //--------------------------- string id = "q" + Model.ID; string style = ""; if (num <= 1) { style = "display:block;"; } else { int width = Convert.ToInt32((100 / num)); if (width <= 25) { width--; } style = "display:inline-block;"; style += "width:"+ width + "%;"; } } @switch (type) { case "radio": { foreach (DataRow dr in options.Rows) { } } break; case "select": { } break; }