示例#1
0
 // GET: Borrower/Details/5
 public ActionResult Details(int id)
 {
     try
     {
         using (Context ctx = new Context())
         {
             var data = VMBorrower.MakeNew(ctx.BorrowerFindByID(id));
             return(View(data));
         }
     }
     catch (Exception ex)
     {
         return(View("Exception", ex));
     }
 }
示例#2
0
 // GET: Borrower/Edit/5
 public ActionResult Edit(int id)
 {
     try
     {
         using (Context ctx = new Context())
         {
             var data = VMBorrower.MakeNew(ctx.BorrowerFindByID(id));
             data.PopulateRoleItems(ctx.RoleGetAll());
             return(View(data));
         }
     }
     catch (Exception ex)
     {
         return(View("Exception", ex));
     }
 }