public ActionResult editloan_member(int?loan_id, int?id)
 {
     if (Session["username"] != null && Session["userroleid"].ToString() == "1")
     {
         Session["mem_id"] = id;
         sp_view_funds_ofMember_by_loanid_Result obj = new sp_view_funds_ofMember_by_loanid_Result();
         obj = db.sp_view_funds_ofMember_by_loanid(loan_id).FirstOrDefault();
         return(View(obj));
     }
     else
     {
         return(RedirectToAction("login", "login"));
     }
 }
 public ActionResult editloan_member(sp_view_funds_ofMember_by_loanid_Result tab)
 {
     try
     {
         if (ModelState.IsValid)
         {
             int res = db.sp_funds_ofMember_for_edit(tab.loan_id, tab.name);
             this.db.SaveChanges();
             TempData["edited"] = "Details edited successfully.";
             return(RedirectToAction("fundlist", new { tab.id }));
         }
         else
         {
             ViewBag.nonullvaluestoaddmember = "please enter the details correctly..!";
             return(View());
         }
     }
     catch (Exception)
     {
         throw;
     }
 }