public BackUp() { BackUpViewModel vm = new BackUpViewModel(); InitializeComponent(); DataContext = vm; }
public async Task <IActionResult> Index() { var UserId = HttpContext.Session.GetInt32(SD.UserId); BackUpViewModel backUpVM = new BackUpViewModel() { //UserModel = await accountService.GetUser(_db, UserId) }; return(View(backUpVM)); }
public BackUpView() { InitializeComponent(); DataContext = new BackUpViewModel(); }
private List<BackUpViewModel> GetAllBackUps() { List<BackUpViewModel> l_buvm = new List<BackUpViewModel>(); foreach (BackUp bu in db.BackUps.ToList()) { BackUpViewModel buvm = new BackUpViewModel(); buvm.date = bu.date_uploaded.ToString("MM/dd/yyyy hh:mm:ss tt"); buvm.num_posts = bu.num_posts; buvm.id = bu.id; l_buvm.Add(buvm); } return l_buvm; }