public async Task <ActionResult> DeleteConfirmed(int id)
        {
            MemberBankDetail memberBankDetail = await db.MemberBankDetails.FindAsync(id);

            db.MemberBankDetails.Remove(memberBankDetail);
            await db.SaveChangesAsync();

            return(RedirectToAction("Index"));
        }
        public async Task <ActionResult> Create(MemberBankDetail memberBankDetail)
        {
            if (ModelState.IsValid)
            {
                db.MemberBankDetails.Add(memberBankDetail);
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            var userId = User.Identity.GetUserId();

            ViewBag.MemberId = new SelectList(db.Members.Where(u => u.MemberId.Equals(userId)), "MemberId", "FirstName", memberBankDetail.MemberId);
            return(View(memberBankDetail));
        }
        // GET: MemberBankDetails/Details/5
        public async Task <ActionResult> Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MemberBankDetail memberBankDetail = await db.MemberBankDetails.FindAsync(id);

            if (memberBankDetail == null)
            {
                return(HttpNotFound());
            }
            return(View(memberBankDetail));
        }
        public async Task <ActionResult> Edit(MemberBankDetail memberBankDetail)
        {
            if (ModelState.IsValid)
            {
                db.Entry(memberBankDetail).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }

            var userId = User.Identity.GetUserId();

            ViewBag.MemberId = new SelectList(db.Members.Where(u => u.MemberId.Equals(userId)), "MemberId", "BusinessStreet", memberBankDetail.MemberId);
            return(View(memberBankDetail));
        }
        // GET: MemberBankDetails/Edit/5
        public async Task <ActionResult> Edit(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            MemberBankDetail memberBankDetail = await db.MemberBankDetails.FindAsync(id);

            if (memberBankDetail == null)
            {
                return(HttpNotFound());
            }
            var userId = User.Identity.GetUserId();

            ViewBag.MemberId = new SelectList(db.Members.Where(u => u.MemberId.Equals(userId)), "MemberId", "FirstName", memberBankDetail.MemberId);
            return(View(memberBankDetail));
        }