Appleseed.Base.Web/UserView.aspx.cs
/// <summary>
/// Lbs the view item on command.
/// </summary>
/// <param name="sender">Sender.</param>
/// <param name="args">Arguments.</param>
Lbs the view item on command.
Lbs the view item on command .
protected void lbViewItem_OnCommand(Object sender, CommandEventArgs args){
			if (args.CommandName == "View") {
				MongoClient client = new MongoClient ();
				var database = client.GetDatabase ("test");
				var collection = database.GetCollection<BaseCollectionItem> ("CollectionItems");
				mylog.Info ("Connected to MongoDB ");
				Task.Run (async () =>  {
					mylog.Info ("Retreive Information from Database");
				}).Wait ();
				fvCollectionItem.Visible = true;
			}
		}
protected void lbViewItem_OnCommand ( Object sender , CommandEventArgs args ) { if ( args . CommandName == " " ) { MongoClient client = new MongoClient ( ) ; var database = client . GetDatabase ( " " ) ; var collection = database . GetCollection < BaseCollectionItem > ( " " ) ; mylog . Info ( " " ) ; Task . Run ( async ( ) => { mylog . Info ( " " ) ; } ) . Wait ( ) ; fvCollectionItem . Visible = true ; } }
Lbs the view item on command.
Lbs the view item on command .
//TODO: when item is selected, bind data to panel and then make panel visible  //TODO go to mongo, get data, bind to form view  //TODO: retrieve data from mongodb //var items = await collection.Find (x => x._id == ObjectId.Parse ((string)args.CommandArgument) ).ToListAsync (); //fvCollectionItem.DataSource = items; //fvCollectionItem.DataBind(); //ifContentCache.InnerHtml = "Things will go here";
sender
Object
None
args
CommandEventArgs
None