// GET: Moderator public ActionResult Index() { List <ModeratorPO> moderatorPOList = new List <ModeratorPO>(); try { List <ModeratorDO> moderatorDOList = _moderatorDAO.ObtainAllModerators(); foreach (ModeratorDO moderatorDO in moderatorDOList) { ModeratorPO moderatorPO = Mapping.Mapper.ModeratorDOtoPO(moderatorDO); moderatorPOList.Add(moderatorPO); } } catch (Exception ex) { _logger.LogMessage(ex, "Fatal"); } finally { } return(View(moderatorPOList)); }
public void FillModeratorDropDown(ReactorPO form) { form.ModeratorDropDown = new List <SelectListItem>(); form.ModeratorDropDown.Add(new SelectListItem { Text = "None", Value = "0" }); try { List <ModeratorDO> moderatorDOList = _moderatorDAO.ObtainAllModerators(); foreach (ModeratorDO moderatorDO in moderatorDOList) { ModeratorPO moderatorPO = Mapping.Mapper.ModeratorDOtoPO(moderatorDO); form.ModeratorDropDown.Add(new SelectListItem { Text = moderatorPO.Name, Value = moderatorPO.ModeratorID.ToString() }); } } catch (Exception ex) { _logger.LogMessage(ex, "Fatal"); } finally { } }