private static string getDataLink(IBinderValue item, MvcContext ctx) { if (item == null) { return("#"); } if (ctx == null) { return(item.Link); } if (item.obj == null) { return(item.Link); } ContentPost post = item.obj as ContentPost; if (post == null) { return(item.Link); } return(alink.ToAppData(post, ctx)); }
public static void bindMashupData( IBlock block, IBinderValue item, int itemIndex ) { block.Set( "post.ItemIndex", itemIndex ); block.Set( "post.Title", item.Title ); block.Set( "post.Url", item.Link ); block.Set( "post.Created", item.Created.Day ); block.Set( "post.CreatedDay", item.Created.ToShortDateString() ); block.Set( "post.CreatedTime", item.Created.ToShortTimeString() ); block.Set( "post.CreatorName", item.CreatorName ); block.Set( "post.CreatorLink", item.CreatorLink ); block.Set( "post.CreatorPic", item.CreatorPic ); block.Set( "post.Content", item.Content ); block.Set( "post.Summary", strUtil.CutString( item.Content, 200 ) ); block.Set( "post.PicUrl", item.PicUrl ); block.Set( "post.Replies", item.Replies ); block.Bind( "post", item ); }
public static void bindMashupData(IBlock block, IBinderValue item, int itemIndex) { block.Set("post.ItemIndex", itemIndex); block.Set("post.Title", item.Title); block.Set("post.Url", item.Link); block.Set("post.Created", item.Created.Day); block.Set("post.CreatedDay", item.Created.ToShortDateString()); block.Set("post.CreatedTime", item.Created.ToShortTimeString()); block.Set("post.CreatorName", item.CreatorName); block.Set("post.CreatorLink", item.CreatorLink); block.Set("post.CreatorPic", item.CreatorPic); block.Set("post.Content", item.Content); block.Set("post.Summary", strUtil.CutString(item.Content, 200)); block.Set("post.PicUrl", item.PicUrl); block.Set("post.Replies", item.Replies); block.Bind("post", item); }
public static void bindMashupData(IBlock block, IBinderValue item, int itemIndex) { bindMashupData(block, item, itemIndex, null); }
public static void bindMashupData( IBlock block, IBinderValue item, int itemIndex ) { bindMashupData( block, item, itemIndex, null ); }
private static string getDataLink( IBinderValue item, MvcContext ctx ) { if (item == null) return "#"; if (ctx == null) return item.Link; if (item.obj == null) return item.Link; ContentPost post = item.obj as ContentPost; if (post == null) return item.Link; return alink.ToAppData( post, ctx ); }
public BindTextValue(Select control, IBinderValue <string> value) : base(control) { _valueBind = value; _valueBind.ValueChangedEvent += ValueBindOnValueChangedEvent; _select = (Select)_control; }