public ActionResult DocumentViewerExportToNhapKho() { var report = new CongCuDungCu.Reports.rpNhapKho(); report.getIDDonVi(System.Web.HttpContext.Current.User.Identity.Name); report.Fill(AccountDataProvider.GetSystemDate()); return(DocumentViewerExtension.ExportTo(report)); }
public ActionResult rpNhapKhoPartial() { var report = new CongCuDungCu.Reports.rpNhapKho(); report.getIDDonVi(System.Web.HttpContext.Current.User.Identity.Name); report.Fill(AccountDataProvider.GetSystemDate()); ViewData["Report"] = report; return(PartialView("rpNhapKhoPartial")); }
public ActionResult ChangePassword(ChangePasswordModel model) { if (Request.Params["btnUpdate"] == null) { ModelState.Clear(); return(DemoView("ChangePassword", model)); } if (ModelState.IsValid) { bool changePasswordSucceeded; try { changePasswordSucceeded = MembershipService.ChangePassword(User.Identity.Name, model.OldPassword, model.NewPassword); } catch (Exception) { changePasswordSucceeded = false; } if (changePasswordSucceeded) { AccountDataProvider.UpdateNewPassword(User.Identity.Name, model.NewPassword); AccountDataProvider.UpdateLastPasswordChangeDate(User.Identity.Name); return(RedirectToAction("ChangePasswordSuccess")); } else { ModelState.AddModelError(string.Empty, "Mật khẩu cũ không đúng hoặc mật khẩu mới bị sai!"); return(DemoView("ChangePassword", model)); } } return(View(model)); }
public Consumer(AccountDataProvider dataProvider) { AccountDataProvider = dataProvider; }