public ActionResult ActiveUser(string Id) { try { RepoUserMaster db = new RepoUserMaster(); var data = db.ActiveUser(Id); switch (data) { case "Blocked": TempData["success"] = "This User is Blocked"; break; case "Re-Active": TempData["success"] = "This User is Re-Active"; break; case "False": TempData["error"] = "Connection Error!"; break; } return(RedirectToAction("UserMaster", "Home")); } catch (Exception ee) { TempData["error"] = "Record Not Found or Deleted by Another user"; return(RedirectToAction("UserMaster", "Home")); } }
public ActionResult UserMasterPartialView() { try { RepoUserMaster db = new RepoUserMaster(); var s = db.getUser(); ViewBag.allusers = s; return(PartialView()); } catch (Exception ex) { return(PartialView()); } }
public ActionResult ConfirmWithdrawal(int id) { try { RepoUserMaster repo = new RepoUserMaster(); bool status = repo.ConfirmWithdrawal(id); if (status) { TempData["success"] = "This transaction is confirmed withdrawal"; } else { TempData["error"] = "This transaction is not confirmed withdrawal"; } } catch (Exception ex) { TempData["error"] = ex.Message; } return(RedirectToAction("TransactionPending", "Home")); }
public ActionResult TransactionPendingPartialView() { RepoUserMaster db = new RepoUserMaster(); return(PartialView(db.GetTransactionsPending())); }