Esempio n. 1
0
        public IActionResult Comment([FromBody] OrderComment comment)
        {
            var result = Service.Comment(comment);

            Service.ReloadCommentScore(comment.BusinessId);
            return(Json(result));
        }
 public Task CreateAsync(
     OrderComment comment,
     Dictionary <string, string> headers = default,
     CancellationToken ct = default)
 {
     return(_factory.PostAsync(_host + "/Orders/Comments/v1/Create", null, comment, headers, ct));
 }
Esempio n. 3
0
        public ActionResult SaveComment(int orderId, string comment)
        {
            //User is logged in
            if (!User.Identity.IsAuthenticated || !User.IsInRole("authorized-user"))
            {
                return(RedirectToAction("MyOrders"));
            }
            //User is responsible for this step
            Order order = fillData(orderId);

            if (!User.IsInRole(order.Step.Responsible))
            {
                return(RedirectToAction("MyOrders"));
            }
            //Move to next step, if succesfull, record the change
            try
            {
                OrderComment orderComment = new OrderComment();
                orderComment.Date    = DateTime.Now;
                orderComment.Comment = comment;
                orderComment.Step    = order.Step;
                orderComment.User    = User.Identity.Name;
                order.OrderComments.Add(orderComment);
                db.SaveChanges();
            }
            catch
            {
                return(RedirectToAction("FillOrder", new { @id = orderId }));
            }
            return(RedirectToAction("FillOrder", new { @id = orderId }));
        }
Esempio n. 4
0
        public async Task <IActionResult> Edit(int id, [Bind("ID,OrderId,Comment,CreatedAt,DeletedAt")] OrderComment orderComment)
        {
            if (id != orderComment.ID)
            {
                return(NotFound());
            }

            if (ModelState.IsValid)
            {
                try
                {
                    _context.Update(orderComment);
                    await _context.SaveChangesAsync();
                }
                catch (DbUpdateConcurrencyException)
                {
                    if (!OrderCommentExists(orderComment.ID))
                    {
                        return(NotFound());
                    }
                    else
                    {
                        throw;
                    }
                }
                return(RedirectToAction("Index"));
            }
            ViewData["OrderId"] = new SelectList(_context.Order, "ID", "ID", orderComment.OrderId);
            return(View(orderComment));
        }
Esempio n. 5
0
        public async Task WhenCreate_ThenSuccess()
        {
            var headers = await _defaultRequestHeadersService.GetAsync();

            var type = await _create.OrderType.BuildAsync();

            var status = await _create.OrderStatus.BuildAsync();

            var order = await _create.Order
                        .WithTypeId(type.Id)
                        .WithStatusId(status.Id)
                        .BuildAsync();

            var comment = new OrderComment
            {
                Id      = Guid.NewGuid(),
                OrderId = order.Id,
                Value   = "Test".WithGuid()
            };

            await _orderCommentsClient.CreateAsync(comment, headers);

            var request = new OrderCommentGetPagedListRequest
            {
                OrderId = order.Id
            };

            var createdComment = (await _orderCommentsClient.GetPagedListAsync(request, headers)).Comments.First();

            Assert.NotNull(createdComment);
            Assert.Equal(comment.OrderId, createdComment.OrderId);
            Assert.True(!createdComment.CommentatorUserId.IsEmpty());
            Assert.Equal(comment.Value, createdComment.Value);
            Assert.True(createdComment.CreateDateTime.IsMoreThanMinValue());
        }
        public PartialViewResult Details(int?id, string header, string Message, FormCollection collection)
        {
            if (header.IsFilled())
            {
                ViewBag.Header = header;
            }
            var u = db.Orders.FirstOrDefault(x => x.ID == id);

            if (u == null)
            {
                ViewBag.Message = "Заказ не найден.";
                return(Details(id, header));
            }
            if (Message.IsNullOrEmpty())
            {
                ModelState.AddModelError("", "Необходимо заполнить поле для сообщения.");
                return(Details(id, header));
            }
            var now = DateTime.Now;

            now = now.Subtract(new TimeSpan(0, 0, 0, 0, now.Millisecond));
            var comment = new OrderComment()
            {
                Author = null, Comment = Message, Date = now, OrderID = u.ID
            };

            db.OrderComments.InsertOnSubmit(comment);
            db.SubmitChanges();

            return(Details(id, header));
        }
        public async Task <bool> AddOrderComment(string message, string orderId)
        {
            // POST https://sandboxusdev.myvtex.com/api/do/notes/

            OrderComment orderComment = new OrderComment
            {
                Description = message,
                Domain      = StorePickUpConstants.CommentDomain,
                Target      = new Target
                {
                    Id   = orderId,
                    Type = StorePickUpConstants.CommentType,
                    Url  = $"/orders/{orderId}"
                }
            };

            var jsonSerializedMessage = JsonConvert.SerializeObject(orderComment);

            Console.WriteLine($"Sending {jsonSerializedMessage} to http://do.vtexcommercebeta.com.br/api/do/notes?an={this._httpContextAccessor.HttpContext.Request.Headers[StorePickUpConstants.VTEX_ACCOUNT_HEADER_NAME]}");

            //  http://do.vtexcommercebeta.com.br/api/do/notes?an=sandboxusdev

            var request = new HttpRequestMessage
            {
                Method     = HttpMethod.Post,
                RequestUri = new Uri($"https://do.vtexcommercebeta.com.br/api/do/notes?an={this._httpContextAccessor.HttpContext.Request.Headers[StorePickUpConstants.VTEX_ACCOUNT_HEADER_NAME]}"),
                Content    = new StringContent(jsonSerializedMessage, Encoding.UTF8, StorePickUpConstants.APPLICATION_JSON)
            };

            request.Headers.Add(StorePickUpConstants.USE_HTTPS_HEADER_NAME, "true");
            string authToken = _context.Vtex.AuthToken;

            if (authToken != null && authToken != null)
            {
                request.Headers.Add(StorePickUpConstants.AUTHORIZATION_HEADER_NAME, authToken);
            }
            else
            {
                Console.WriteLine("Missing Token!");
            }

            MerchantSettings merchantSettings = await _storePickupRepository.GetMerchantSettings();

            string appKey   = merchantSettings.AppKey;
            string appToken = merchantSettings.AppToken;

            request.Headers.Add(StorePickUpConstants.AppKey, appKey);
            request.Headers.Add(StorePickUpConstants.AppToken, appToken);

            var client   = _clientFactory.CreateClient();
            var response = await client.SendAsync(request);

            string responseContent = await response.Content.ReadAsStringAsync();

            Console.WriteLine($"[-] AddOrderComment Response {response.StatusCode} Content = '{responseContent}' [-]");
            _context.Vtex.Logger.Info("AddOrderComment", null, $"{jsonSerializedMessage} [{response.StatusCode}] {responseContent}");

            return(response.IsSuccessStatusCode);
        }
        public void GetTradeIndexFromString_WorksCorrectlyWhenTradeIndexNotSet()
        {
            var orderComment = new OrderComment("Some Order Comment");
            var actual       = TradingStrategyHelper.GetTradeIndexFromOrderComment(JsonConvert.SerializeObject(orderComment));
            var expected     = -1;

            Assert.AreEqual(expected, actual);
        }
Esempio n. 9
0
        public async Task <ActionResult> Create(OrderComment comment, CancellationToken ct = default)
        {
            var order = await _ordersService.GetAsync(comment.OrderId, false, ct);

            return(await ActionIfAllowed(
                       () => _orderCommentsService.CreateAsync(_userContext.UserId, comment, ct),
                       Roles.Orders,
                       order.AccountId));
        }
Esempio n. 10
0
        public static OrderComment OrderComment(int?counter)
        {
            var rtValue = new OrderComment();

            rtValue.Order = new Order();
            rtValue.User  = new User();
            rtValue.Text  = "Text" + counter.Extra();

            return(rtValue);
        }
Esempio n. 11
0
        void IOrderCommentRepository.UpdateComment(OrderComment comment)
        {
            var query    = GetAll();
            var Lcomment = query.Where(o => o.Id == comment.Id).FirstOrDefault();

            Lcomment.ReMark  = comment.ReMark;
            Lcomment.Score   = comment.Score;
            Lcomment.Comment = comment.Comment;
            Update(Lcomment);
        }
Esempio n. 12
0
        public IActionResponse <OrderComment> Add(OrderComment model)
        {
            _OrderComment.Add(model);
            var rep = _uow.SaveChanges();

            return(new ActionResponse <OrderComment> {
                Result = model,
                Message = rep.ToSaveChangeMessageResult(BusinessMessage.Success, BusinessMessage.Error),
                IsSuccessful = rep.ToSaveChangeResult()
            });
        }
Esempio n. 13
0
        public async Task <IActionResult> Create([Bind("OrderCommentId,OrderId,Comment,Urgent")] OrderComment orderComment)
        {
            if (ModelState.IsValid)
            {
                _context.Add(orderComment);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            ViewData["OrderId"] = new SelectList(_context.Order, "OrderId", "OrderGuid", orderComment.OrderId);
            return(View(orderComment));
        }
Esempio n. 14
0
 public OrderCommentBuilder(
     IDefaultRequestHeadersService defaultRequestHeadersService,
     IOrderCommentsClient orderCommentsClient)
 {
     _orderCommentsClient          = orderCommentsClient;
     _defaultRequestHeadersService = defaultRequestHeadersService;
     _comment = new OrderComment
     {
         Id    = Guid.NewGuid(),
         Value = "Test".WithGuid()
     };
 }
Esempio n. 15
0
 /// <summary>
 /// 修改显示状态
 /// </summary>
 /// <returns></returns>
 public int UptOrderCom(OrderComment orderComment)
 {
     try
     {
         string sql = $" update OrderComment set State=ABS(State-1) where Commentid = {orderComment.Commentid}  ";
         return(DapperHelper.Execute(sql));
     }
     catch (Exception)
     {
         throw;
     }
 }
Esempio n. 16
0
        public async Task <IActionResult> Create([Bind("ID,OrderId,Comment,CreatedAt,DeletedAt")] OrderComment orderComment)
        {
            if (ModelState.IsValid)
            {
                _context.Add(orderComment);
                await _context.SaveChangesAsync();

                return(RedirectToAction("Index"));
            }
            ViewData["OrderId"] = new SelectList(_context.Order, "ID", "ID", orderComment.OrderId);
            return(View(orderComment));
        }
Esempio n. 17
0
 public static OrderCommentModel ToModel(this OrderComment anOrderCommentEntity)
 {
     return(new OrderCommentModel()
     {
         OrderId = anOrderCommentEntity.OrderId,
         OrderComments = anOrderCommentEntity.OrderComments,
         InternalComments = anOrderCommentEntity.InternalComments,
         RaiComments = anOrderCommentEntity.Raicomments,
         CredAuthComments = anOrderCommentEntity.CredAuthComments,
         VoidComments = anOrderCommentEntity.VoidComments,
         JobHoldComments = anOrderCommentEntity.JobHoldComments
     });
 }
Esempio n. 18
0
        public async Task <IActionResult> Reply(int id, [FromQuery] string content)
        {
            var comment = new OrderComment {
                ID = id, ReplyContent = content, ReplyTime = DateTime.Now
            };
            var result = new JsonData
            {
                Success = await Service.UpdateAsync(comment, new List <string> {
                    nameof(comment.ReplyContent), nameof(comment.ReplyTime)
                }) > 0
            };

            return(Json(result));
        }
Esempio n. 19
0
        public virtual JsonResult Add(OrderComment model)
        {
            if (!ModelState.IsValid)
            {
                return(Json(new { ISuccessful = false, Message = LocalMessage.ValidationFailed }));
            }
            var rep = _orderCommentBusiness.Add(model);

            return(Json(new
            {
                rep.IsSuccessful,
                rep.Message,
                Result = !rep.IsSuccessful ? null : MvcExtention.RenderViewToString(this, MVC.OrderComment.Views.Partials._ShowItem, rep.Result)
            }));
        }
Esempio n. 20
0
        public async Task CreateAsync(Guid userId, OrderComment comment, CancellationToken ct)
        {
            var newComment = new OrderComment
            {
                Id                = Guid.NewGuid(),
                OrderId           = comment.OrderId,
                CommentatorUserId = userId,
                Value             = comment.Value,
                CreateDateTime    = DateTime.UtcNow
            };

            await _storage.AddAsync(newComment, ct);

            await _storage.SaveChangesAsync(ct);
        }
Esempio n. 21
0
        private OrderComment ConvertOrderCommentToCreate(OrderCommentToCreateDTO x)
        {
            if (x == null)
            {
                return(null);
            }

            OrderComment comment = new OrderComment
            {
                UserId  = x.UserId,
                OrderId = x.OrderId,
                Message = x.Message
            };

            return(comment);
        }
Esempio n. 22
0
        public IActionResult AddComment(AddOrderComment model)
        {
            Order        order = db.Orders.Find(model.orderid);
            OrderComment cc    = new OrderComment
            {
                Order  = order,
                Posted = DateTime.Now,
                Text   = model.comment
            };
            string login = User.Identity.Name;

            cc.User = db.Users.Where(u => u.Login == login).FirstOrDefault();
            db.OrderComments.Add(cc);
            db.SaveChanges();

            return(Comments(model.orderid));
        }
        public async Task <IActionResult> PostOrderComment([FromForm] string values)
        {
            var newOrderComment = new OrderComment();

            JsonConvert.PopulateObject(values, newOrderComment);

            if (!TryValidateModel(newOrderComment))
            {
                return(BadRequest());
            }

            await _context.OrderComment.AddAsync(newOrderComment);

            await _context.SaveChangesAsync();

            return(Ok(newOrderComment));
        }
Esempio n. 24
0
        private OrderCommentDTO ConvertOrderComment(OrderComment x)
        {
            if (x == null)
            {
                return(null);
            }

            OrderCommentDTO comment = new OrderCommentDTO
            {
                CommentId = x.OrderCommentId,
                UserId    = x.UserId,
                OrderId   = x.OrderId,
                Message   = x.Message,
                PostedOn  = x.PostedOn.ToString("dd/MM/yyyy")
            };

            return(comment);
        }
Esempio n. 25
0
 public async Task <IHttpActionResult> Post(OrderComment comment)
 {
     try
     {
         if (ModelState.IsValid)
         {
             _repo.AddOrderComment(comment);
             if (await _repo.SaveChangesAsync())
             {
                 return(Created("", comment));
             }
         }
     }
     catch (Exception ex)
     {
         return(BadRequest(ex.Message));
     }
     return(BadRequest());
 }
        public PartialViewResult Details(int?id, string header)
        {
            var u = db.Orders.FirstOrDefault(x => x.ID == id);

            if (header.IsFilled())
            {
                ViewBag.Header = header;
            }
            else if (u != null)
            {
                ViewBag.Header = "Информация о заказе №S" + u.ID.ToString("d9");
            }

            if (u == null)
            {
                ViewBag.Message = "Заказ не найден.";
                return(PartialView(u));
            }
            if (Request.HttpMethod == "GET")
            {
                try
                {
                    XDocument data = XDocument.Load("http://www.sprinter.ru/obmen/?order_id=" + id);
                    //XDocument data = XDocument.Load("http://www.sprinter.ru/obmen/?order_id=1347276765");
                    var status = data.Descendants("status").ToList();
                    if (status.Any())
                    {
                        u.StatusID = OrderStatus.GetStatusIDByRUS(status.First().Value);
                    }
                    var comments = data.Descendants("comment").ToList();
                    if (comments.Any())
                    {
                        foreach (XElement comment in comments)
                        {
                            DateTime date;
                            if (DateTime.TryParseExact(comment.Attribute("date").Value, "yyyy-MM-dd HH:mm:ss",
                                                       CultureInfo.CurrentCulture, DateTimeStyles.None, out date))
                            {
                                var dbc = db.OrderComments.FirstOrDefault(x => x.OrderID == u.ID && x.Date == date);
                                if (dbc == null)
                                {
                                    dbc = new OrderComment()
                                    {
                                        Author  = comment.Attribute("name").Value,
                                        Comment = comment.Value,
                                        OrderID = u.ID,
                                        Date    = date
                                    };
                                    db.OrderComments.InsertOnSubmit(dbc);
                                }
                            }
                        }
                    }
                    db.SubmitChanges();
                }
                catch
                {
                }
            }
            string message = "";

            message = "<h3>Статус заказа:</h3>" + u.OrderStatus.Status + "<br><br>";

            message += "<h3>Заказанные товары:</h3><br><table>";
            message += "<tr><td><b>Название</b></td><td><b>Количество</b></td><td><b>Цена</b></td></tr>";
            message += string.Join("",
                                   u.OrderedProducts.Select(
                                       x =>
                                       "<tr><td>{0}</td><td>{1}</td><td>{2}</td></tr>".FormatWith(
                                           x.StoreProduct.Name, x.Amount.ToString(),
                                           x.Sum.ForDisplaing())));
            message += "<tr><td colspan=\"3\"><b>Итого к оплате &nbsp;&mdash;&nbsp;" +
                       u.TotalSum + " руб.</b></td></tr> </table><br><br>";

            /*
             *          message += "<h3>Информация о покупателе:</h3><br>";
             *          message += ShopCart.TranslateToHtml(u.UserData, "UserData");
             *          var orgData = u.OrderDetail.OrgData;
             *          if (!string.IsNullOrEmpty(orgData))
             *          {
             *              message += "<h3>Информация о юридическом лице:</h3><br>";
             *              message += ShopCart.TranslateToHtml(orgData, "OrgData");
             *          }
             */
            if (u.OrderDetail.OrderDeliveryRegion != null)
            {
                message +=
                    "<h3>Информация о доставке:</h3><br><b>{0}, {1}, стоимость - {2} руб.</b><br>".FormatWith(
                        u.OrderDetail.OrderDeliveryRegion.OrderDeliveryProvider.Name,
                        u.OrderDetail.OrderDeliveryRegion.Name, u.OrderDetail.DeliveryCost.ForDisplaing());
            }
            message     += ShopCart.TranslateToHtml(u.OrderDetail.Address ?? "", "Address");
            ViewBag.Data = message;
            return(PartialView(u));
        }
Esempio n. 27
0
 void IOrderCommentRepository.AddComment(OrderComment comment)
 {
     Insert(comment);
 }
Esempio n. 28
0
 public void AddOrderComment(OrderComment comment)
 {
     _context.OrderComments.Add(comment);
 }
Esempio n. 29
0
        private void BindOrderModel(Order order, OrderViewModel model, bool includeLineItemsAndSplits = false)
        {
            var workgroup = _repositoryFactory.WorkgroupRepository.GetById(model.Workgroup);

            //TODO: automapper?
            order.Vendor = model.Vendor == 0 ? null : _repositoryFactory.WorkgroupVendorRepository.GetById(model.Vendor);
            order.Address = _repositoryFactory.WorkgroupAddressRepository.GetById(model.ShipAddress);
            order.ShippingType = _repositoryFactory.ShippingTypeRepository.GetById(model.ShippingType);
            order.DateNeeded = model.DateNeeded;
            order.AllowBackorder = model.AllowBackorder;
            order.Workgroup = workgroup;
            order.Organization = workgroup.PrimaryOrganization; //TODO: why is this needed?
            order.DeliverTo = model.ShipTo;
            order.DeliverToEmail = model.ShipEmail;
            order.DeliverToPhone = model.ShipPhone;
            order.OrderType = order.OrderType ?? _repositoryFactory.OrderTypeRepository.GetById(OrderType.Types.OrderRequest);
            order.CreatedBy = order.CreatedBy ?? _repositoryFactory.UserRepository.GetById(CurrentUser.Identity.Name); //Only replace created by if it doesn't already exist
            order.Justification = model.Justification;
            order.BusinessPurpose = model.BusinessPurpose;
            order.RequestType = model.RequestType;

            if (!string.IsNullOrWhiteSpace(model.Comments))
            {
                var comment = new OrderComment
                {
                    DateCreated = DateTime.UtcNow.ToPacificTime(),
                    User = _repositoryFactory.UserRepository.GetById(CurrentUser.Identity.Name),
                    Text = model.Comments
                };

                order.AddOrderComment(comment);
            }

            if (model.CustomFields != null)
            {
                order.CustomFieldAnswers.Clear();

                foreach (var customField in model.CustomFields.Where(x => !string.IsNullOrWhiteSpace(x.Answer)))
                {
                    var answer = new CustomFieldAnswer
                    {
                        Answer = customField.Answer,
                        CustomField = _repositoryFactory.CustomFieldRepository.GetById(customField.Id)
                    };

                    order.AddCustomAnswer(answer);
                }
            }

            if (model.Restricted != null && model.Restricted.IsRestricted)
            {
                var restricted = new ControlledSubstanceInformation
                {

                    ClassSchedule = model.Restricted.Class,
                    Custodian = model.Restricted.Custodian,
                    EndUser = model.Restricted.Users,
                    StorageSite = model.Restricted.StorageSite,
                    Use = model.Restricted.Use,
                    PharmaceuticalGrade = model.Restricted.PharmaceuticalGrade
                };

                order.SetAuthorizationInfo(restricted);
            }
            else
            {
                order.ClearAuthorizationInfo();
            }

            if (includeLineItemsAndSplits)
            {
                _bugTrackingService.CheckForClearedOutSubAccounts(order, model.Splits, model);

                decimal number;
                order.EstimatedTax = decimal.TryParse(model.Tax != null ? model.Tax.TrimEnd('%') : null, out number) ? number : order.EstimatedTax;
                order.ShippingAmount = decimal.TryParse(model.Shipping != null ? model.Shipping.TrimStart('$') : null, out number) ? number : order.ShippingAmount;
                order.FreightAmount = decimal.TryParse(model.Freight != null ? model.Freight.TrimStart('$') : null, out number) ? number : order.FreightAmount;

                order.LineItems.Clear(); //replace line items and splits
                order.Splits.Clear();

                //Add in line items
                foreach (var lineItem in model.Items)
                {
                    if (lineItem.IsValid())
                    {
                        Commodity commodity = null;
                        if (!string.IsNullOrWhiteSpace(lineItem.CommodityCode))
                        {
                            commodity = _repositoryFactory.CommodityRepository.Queryable.SingleOrDefault(a => a.Id == lineItem.CommodityCode && a.IsActive);
                        }

                        //TODO: could use automapper later, but need to do validation
                        var orderLineItem = new LineItem
                        {
                            CatalogNumber = lineItem.CatalogNumber,
                            Commodity = commodity,
                            Description = lineItem.Description,
                            Notes = lineItem.Notes,
                            Quantity = decimal.Parse(lineItem.Quantity),
                            Unit = lineItem.Units,//TODO: shouldn't this link to UOM?
                            UnitPrice = decimal.Parse(lineItem.Price),
                            Url = lineItem.Url
                        };

                        order.AddLineItem(orderLineItem);

                        if (model.SplitType == OrderViewModel.SplitTypes.Line)
                        {
                            var lineItemId = lineItem.Id;

                            //Go through each split created for this line item
                            foreach (var split in model.Splits.Where(x => x.LineItemId == lineItemId))
                            {
                                if (split.IsValid())
                                {
                                    order.AddSplit(new Split
                                    {
                                        Account = split.Account,
                                        Amount = decimal.Parse(split.Amount),
                                        LineItem = orderLineItem,
                                        SubAccount = split.SubAccount,
                                        Project = split.Project
                                    });
                                }
                            }
                        }
                    }
                }

                //TODO: note that I am not checking an order split actually has valid splits, or that they add to the total.
                if (model.SplitType == OrderViewModel.SplitTypes.Order)
                {
                    foreach (var split in model.Splits)
                    {
                        if (split.IsValid())
                        {
                            order.AddSplit(new Split
                            {
                                Account = split.Account,
                                Amount = decimal.Parse(split.Amount),
                                SubAccount = split.SubAccount,
                                Project = split.Project
                            });
                        }
                    }
                }
                else if (model.SplitType == OrderViewModel.SplitTypes.None)
                {
                    order.AddSplit(new Split { Amount = order.Total(), Account = model.Account, SubAccount = model.SubAccount, Project = model.Project }); //Order with "no" splits get one split for the full amount
                }

                order.TotalFromDb = order.Total();
                order.LineItemSummary = order.GenerateLineItemSummary();
            }
        }
Esempio n. 30
0
        public JsonNetResult AddComment(int id, string comment)
        {
            var order = Repository.OfType<Order>().GetNullableById(id);

            var orderComment = new OrderComment() {Text = comment, User = GetCurrentUser()};
            order.AddComment(orderComment);

            _eventService.OrderAddNote(order, comment);

            _repositoryFactory.OrderRepository.EnsurePersistent(order);

            return
                new JsonNetResult(
                    new {Date = DateTime.UtcNow.ToPacificTime().ToShortDateString(), Text = comment, User = orderComment.User.FullName});
        }
Esempio n. 31
0
        public static OrderComment OrderComment(int? counter)
        {
            var rtValue = new OrderComment();
            rtValue.Order = new Order();
            rtValue.User = new User();
            rtValue.Text = "Text" + counter.Extra();

            return rtValue;
        }