// GET: Comment/Create public ActionResult Create(int billTo, int shipTo, int centerNumber, int routePlanId, int stopNumber, string screen) { var model = new CreateRouteCommentModel { BillTo = billTo, ShipTo = shipTo, CenterNumber = centerNumber, RoutePlanId = routePlanId, StopNumber = stopNumber, Screen = screen }; return(PartialView("_create", model)); }
public async Task <ActionResult> CommonCreate(CreateRouteCommentModel comment) { try { await CommentService.AddCommentAsync(new services.models.AddComment { CenterNumber = comment.CenterNumber, CreatedBy = LastFirstName.ToUpperInvariant(), Status = (comment.IsInternal ? 2 : 3), PrimaryRecordId = $"{comment.BillTo}-{comment.ShipTo}", SecondaryRecordId = comment.RoutePlanId.ToString(), Screen = comment.Screen, ShortComment = comment.Category, LongComment = comment.LongComment }); return(RedirectToAction("ListByBillToShipTo", new { billTo = comment.BillTo, shipTo = comment.ShipTo, stopNumber = comment.StopNumber, routePlanId = comment.RoutePlanId, centerNumber = comment.CenterNumber, screen = comment.Screen })); } catch { return(null); } }