//show host info private void setViewBagHostInfo() { if (Session["HostId"] != null) { HostDAO dao = new HostDAO(); Host host = dao.getHostById(Session["HostId"].ToString()); if (host != null) { ViewBag.Address = host.Address; ViewBag.FullName = host.Fullname; } } if (Session["LotId"] != null) { Lot lot = new LotDAO().getLotById(Session["LotId"].ToString()); if (lot != null) { ViewBag.LotName = lot.Name; } else { ViewBag.LotName = "All"; } } }
public Host getHostById() { HostDAO dao = new HostDAO(); return(dao.getHostById(this.HostID)); }