Пример #1
0
 /// <summary>
 /// Returns page with the list of PostOperators
 /// </summary>
 /// <returns>page with the list of PostOperators</returns>
 public ActionResult Index()
 {
     try
     {
         return(View("Index", mapper.Map <List <PostOperatorViewModel> >(postOperatorService.GetAll())));
     }
     catch (Exception ex)
     {
         deliveryMessage.Title = "Поштові оператори";
         deliveryMessage.Body  = ex.Message;
         return(View("DeliveryMessage", deliveryMessage));
     }
 }
Пример #2
0
        public ActionResult Index()
        {
            try
            {
                var mainIndexViewModel = new MainIndexViewModel
                {
                    Number        = "",
                    PostOperators = postOperatorsService.GetAll()
                };

                return(View(mainIndexViewModel));
            }
            catch (Exception ex)
            {
                deliveryMessage.Title = "Index";
                deliveryMessage.Body  = ex.Message;
                return(View("DeliveryMessage", deliveryMessage));
            }
        }