Exemple #1
0
 public NoticeDetailsPage(Model.Response.Notice item)
 {
     InitializeComponent();
     BindingContext = model = new NoticeDetailsViewModel()
     {
         Notice = item
     };
 }
Exemple #2
0
        public ActionResult ShowNoticeDetails(int noticeId)
        {
            var categoryRepo = new CategoryRepository();
            var allCategory  = categoryRepo.GetAllCategory();

            var noticeRepo    = new NoticeRepository();
            var currentNotice = noticeRepo.GetNoticeById(noticeId);

            var result = new NoticeDetailsViewModel();

            result.CategoriesList = allCategory;
            result.Notice         = currentNotice;

            return(View(result));
        }