Exemplo n.º 1
0
        public async Task <ActionResult> _ApprovePayment(Payment payment)
        {
            if (ModelState.IsValid)
            {
                db.Entry(payment).State = EntityState.Modified;
                await db.SaveChangesAsync();

                ViewBag.Message = "Payment Approved";
                return(RedirectToAction("Index"));
            }
            ViewBag.MemberID = new SelectList(db.Members, "MemberId", "FirstName", payment.MemberId);
            ViewBag.Message  = " Payment Approval not succesful, Try again";
            return(View(payment));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> Edit(Member member)
        {
            if (ModelState.IsValid)
            {
                member.Gender        = member.GenderList.ToString();
                member.StateOfOrigin = member.StateOfOriginList.ToString();

                if (
                    member.DateOfBirth != null && member.BusinessStreet != null && member.Gender != null &&
                    member.PhoneNumber != null && member.BusinessCity != null && member.BusinessState != null
                    )
                {
                    member.CompletedRegistration = true;
                }

                db.Entry(member).State = EntityState.Modified;

                await db.SaveChangesAsync();

                ViewBag.Message = "Profile registration details successfully captured.";
                return(View());
            }

            ViewBag.Message = "Profile Registration details was not captured successfully, Try again ";
            return(View(member));
        }
Exemplo n.º 3
0
        public async Task <ActionResult> Edit(Contact contact)
        {
            if (ModelState.IsValid)
            {
                db.Entry(contact).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(contact));
        }
Exemplo n.º 4
0
        public async Task <ActionResult> Edit([Bind(Include = "CooperativeBankDetailId,DateCreated,Active,BankName,AccountNumber,AccounName,BVN,SortCode")] CooperativeBankDetail cooperativeBankDetail)
        {
            if (ModelState.IsValid)
            {
                db.Entry(cooperativeBankDetail).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(cooperativeBankDetail));
        }
        public async Task <ActionResult> Edit([Bind(Include = "LoanStatusId,Title,DateCreated,MessageContent")] LoanStatus loanStatus)
        {
            if (ModelState.IsValid)
            {
                db.Entry(loanStatus).State = EntityState.Modified;
                await db.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            return(View(loanStatus));
        }
        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));
        }