@model HelloWorldMvcApp.SampleViewModel
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap 101 Template</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
.field-validation-error {
<div class="col-md-6 col-md-offset-3">
@using (Html.BeginForm())
@Html.LabelFor(m => m.Question)
@Html.TextBoxFor(model => model.Question, new {@class="form-control"})
@Html.ValidationMessageFor(model => model.Question)
<button type="button" class="btn btn-success submit">Ask</button>
<div class="alert alert-warning fade">
<img src="http://entechprod.blob.core.windows.net/dotnetfiddle/morpheus.jpg" style="max-width:100%;"/><br/><br/>
<strong><span class="alert-content"></span></strong>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.11.1/jquery.validate.min.js"></script>
<script src="//ajax.aspnetcdn.com/ajax/mvc/4.0/jquery.validate.unobtrusive.min.js"></script>
<script type="text/javascript">
function openAlert(txt) {
$('.alert-content').text(txt);
$('.alert').addClass('in');
$('.alert').removeClass('in');
var answer = '@Model.Answer';
if(answer && answer != '')
$('#Question').change(closeAlert);
$('#Question').keyup(closeAlert);
$('.submit').click(function(){
url: '@Url.RouteUrl(new{ action="GetAnswer", controller="Home"})',
data: {Answer: '', Question: $('#Question').val()},
contentType: "application/json; charset=utf-8",
success: function(resp) {
constructor(IdDocumentType, Page, ListPages, ListSubPage) {
this.IdDocumentType = IdDocumentType;
this.ListPages = ListPages;
this.ListSubPage = ListSubPage;
$("#BtnApproveDocumentbySerial").on("click", function (e) {
var IdEdhrDocument = $(this).attr('data-id');
var SerialNumber = $(this).attr('data-serial');
text: 'Please verify the information before continuing!',
confirmButtonColor: '#3085d6',
cancelButtonColor: '#d33',
confirmButtonText: 'Continue'
var url = '@Url.Action("eDHRDocumentApprovalbySerial", "Approvals")';
IdEdhrDocument: IdEdhrDocument,
SerialNumber: SerialNumber
var ListPagesGeneral = [];
var idDocumentType = v3.idDocumentType;
IdDocumentType = v.idDocumentType;
var oInputs = JSON.parse(dPdf).data;
oInputs.map((value, idx) => {
v.edhrDocumentSubPage.map((v2, i) => {
var oInputs2 = JSON.parse(dPdf2).data;
oInputs2.map((value, idx) => {
var obj = new DocumentData(idDocumentType, GlobalPage, ListData, ListSubPage);
ListPagesGeneral = ListData;
var urlPdf = '@Url.Action("eDHRDocumentbySerialGeneratePDF", "Approvals")';
console.log(ListPagesGeneral);
var objTest = new PdfDataVM('test','Marco',2,0);
var ListPagesGeneralTest = [];
ListPagesGeneralTest.push(objTest);
ListPagesGeneralTest: ListPagesGeneralTest
swal("Error", "If the problem persist contact IT department error;" + result.message, "error");
swal("Error", "If the problem persist contact IT department error;" + result.message, "error");