public ActionResult PammDetails(PammItem pammItem)
        {
            var model = new PammModel();
            FillPammModel(model);

            if (Request.IsAjaxRequest())
                return PartialView("PammPartialTable", model);
            return View("Pamm", model);
        }
예제 #2
0
 public PammItem GetPammById(int id)
 {
     try
     {
         using (var ctx = DatabaseContext.Instance.Make())
         {
             var account = ctx.ACCOUNT.Where(x => x.ID == id).
                               Select(x => new { item = x, shareItem = x.ACCOUNT_SHARE }).
                               Single();
             var result = new PammItem();
             LinqToEntity.DecorateAccount(result, account.item);
             result.ShareItems = account.shareItem.ToList();
             return result;
         }
     }
     catch (Exception ex)
     {
         Logger.Error("GetPammById()", ex);
         return null;
     }
 }