Exemplo n.º 1
0
        public ActionResult Feedbacks(int id)
        {
            FeedbacksCollectionViewModel feedbacks =
                new FeedbacksCollectionViewModel(orderService.GetFeedbacks(id));

            return(View(feedbacks));
        }
Exemplo n.º 2
0
        public ActionResult SelectedFeedbacks()
        {
            var feedbacks = feedbackService.GetProviderFeedbacks(User.Identity.GetUserId()).Where(m => m.Order.OrderStatus == OrderStatus.Accepted);

            FeedbacksCollectionViewModel model = new FeedbacksCollectionViewModel(feedbacks);

            return(View("FeedbacksOrders", model));
        }
Exemplo n.º 3
0
        public ActionResult FeedbacksProvider()
        {
            var feedbacks = feedbackService.GetProviderFeedbacks(User.Identity.GetUserId());

            FeedbacksCollectionViewModel model = new FeedbacksCollectionViewModel(feedbacks);

            return(View("FeedbacksOrders", model));
        }
Exemplo n.º 4
0
 public ProviderViewModel(ProviderProfile profile)
 {
     Id              = profile.Id;
     FirstName       = profile.FirstName;
     LastName        = profile.LastName;
     Patronymic      = profile.Patronymic;
     CompanyName     = profile.CompanyName;
     ApplicationUser = profile.ApplicationUser;
     Discription     = profile.Discription;
     Services        = new ServiceCollectionViewModel(profile.Services);
     Feedbacks       = new FeedbacksCollectionViewModel(profile.Feedbacks);
     ContentType     = profile.ContentType;
     Content         = profile.Content;
     FileName        = profile.FileName;
     FileType        = profile.FileType;
 }
Exemplo n.º 5
0
        public OrderViewModel(Common.Entities.Order order)
        {
            Id               = order.Id;
            City             = order.City;
            ShortDescription = order.ShortDescription;
            FullDescription  = order.FullDescription;
            NameProvider     = order.NameProvider;
            ContractPrice    = order.ContractPrice;
            Deadline         = order.Deadline;
            Price            = order.Price;
            CreateDate       = order.CreateDate;

            ClientProfileId   = order.ClientProfileId;
            ProviderProfileId = order.ProviderProfileId;

            ServiceId    = order.ServiceId;
            ServiceModel = new ServiceViewModel(order.Service);

            Feedbacks = new FeedbacksCollectionViewModel(order.Feedbacks);

            Images = order.Galery;

            OrderStatus = order.OrderStatus;
        }