Ejemplo n.º 1
0
        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"));
            }
        }
Ejemplo n.º 2
0
 public ActionResult UserMasterPartialView()
 {
     try
     {
         RepoUserMaster db = new RepoUserMaster();
         var            s  = db.getUser();
         ViewBag.allusers = s;
         return(PartialView());
     }
     catch (Exception ex)
     {
         return(PartialView());
     }
 }
Ejemplo n.º 3
0
 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"));
 }
Ejemplo n.º 4
0
        public ActionResult TransactionPendingPartialView()
        {
            RepoUserMaster db = new RepoUserMaster();

            return(PartialView(db.GetTransactionsPending()));
        }