public IHttpActionResult FontType() { FontOperater operater = new FontOperater(); var fontTypes = operater.GetFontTypes(); return(Json(fontTypes)); }
public IHttpActionResult FontDetail(string type) { FontOperater operater = new FontOperater(); FontType[] types = operater.GetFontTypes().ToArray(); FontType font = (from item in types where item.TypeName == type select item).FirstOrDefault(); var fonts = operater.GetFonts(font.TypeId); return(Json(fonts, new Newtonsoft.Json.JsonSerializerSettings { NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore })); }