public CmsPluginAdditionalInfoViewModel AdditionalInfoBind(string username) { var viewmodel = new CmsPluginAdditionalInfoViewModel(); var user = this.userService.GetByUsername(username); if (user.DateCreated != null) { viewmodel.MemberSince = (DateTime) user.DateCreated; } viewmodel.FirebrickVersion = "ALPHA RELEASE 1.0"; viewmodel.NumEnquiries = enquiryService.GetAll().Count(); return viewmodel; }
public ActionResult AdditionalInfo() { var viewModel = new CmsPluginAdditionalInfoViewModel(); try { CmsPluginServiceBinder modelBinder = this.GetServiceBinder(); viewModel = modelBinder.AdditionalInfoBind(User.Identity.Name); } catch (Exception ex) { this.LoggingService.Log(ex.Message); } return this.PartialView(viewModel); }