Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="panel-footer">
- @using (Html.BeginForm("CreateContractWithoutDocuments",
- "ClientSetup", FormMethod.Post,
- new { id = "submitContract", role = "form", @class = "theme-primary ajax-form admin-form" }))
- {
- <div class="text-center">
- <input type="button" class="btn btn-primary CancelForm" value="Cancel" data-bind="click: function(){ $.magnificPopup.close(); }" />
- <input type="submit" class="btn btn-danger" value="Create @contractSideLetterText" data-bind="click: submitContract" />
- </div>
- }
- </div>
- // SAVE
- var fullState = await _contractService.CreateWholeContractAsync(domain);
- if (fullState.CompletionStatus == DomainEnums.ContractCompletedStatusType.Completed)
- {
- // go back to list page and reset pagination and search
- // sort by modified date descending to view latest contracts which may show the new contract first
- var _redirectUrl = Url.Action("Contracts", "ClientSetup",
- new
- {
- page = 1,
- take = Constants.MVC.Pagination.DefaultItemsPerPage.ToString(),
- sortBy = "ModifiedDate",
- sortAsc = false,
- name = string.Empty,
- createdby = string.Empty,
- contractType = 0,
- dateFrom = default(DateTime?),
- dateTo = default(DateTime?)
- });
- return Json(new
- {
- redirectUrl = _redirectUrl,
- isRedirect = true
- });
- }
- // server side errors
- errors.Add(CreateContractFatalError);
- errors.AddRange(ModelState.Values.SelectMany(v => v.Errors).Select(e => e.ErrorMessage));
- return new HttpStatusCodeResult(400, JsonConvert.SerializeObject(errors)); // THROW HTTP 400 ERROR
- }
Add Comment
Please, Sign In to add comment