Ejemplo n.º 1
0
        private void BindNewsFeed()
        {
            DataConnection myConnection = new DataConnection();
            String         script       = "select FeedId,title,LEFT(Description , 30) As Description, Convert(varchar(20), CreationDate, 106) As CreationDate from Newsfeed order by Creationdate DESC;";

            NewsFeedView.DataSource   = myConnection.ExecuteScript(script);
            NewsFeedView.DataKeyNames = new string[] { "FeedId" };
            NewsFeedView.DataBind();
        }
Ejemplo n.º 2
0
    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else
        {
            Destroy(this.gameObject);
        }

        mView = this.gameObject.GetComponent <NewsFeedView>();
        if (mView == null)
        {
            mView = this.gameObject.AddComponent <NewsFeedView>();
        }

        mModel = this.gameObject.GetComponent <NewsFeedModel>();
        if (mModel == null)
        {
            mModel = this.gameObject.AddComponent <NewsFeedModel>();
        }
    }