281 lines
9.4 KiB
Plaintext
281 lines
9.4 KiB
Plaintext
|
|
@{
|
|
ViewBag.Title = "TestView";
|
|
}
|
|
|
|
<h2>TestView</h2>
|
|
|
|
@*<style>
|
|
body {
|
|
font-size: 90.5%;
|
|
}
|
|
|
|
label, input {
|
|
display: block;
|
|
}
|
|
|
|
input.text {
|
|
margin-bottom: 12px;
|
|
width: 95%;
|
|
padding: .4em;
|
|
}
|
|
|
|
fieldset {
|
|
padding: 0;
|
|
border: 0;
|
|
margin-top: 25px;
|
|
}
|
|
|
|
h1 {
|
|
font-size: 1.2em;
|
|
margin: .6em 0;
|
|
}
|
|
|
|
div#users-contain {
|
|
width: 350px;
|
|
margin: 20px 0;
|
|
}
|
|
|
|
div#users-contain table {
|
|
margin: 1em 0;
|
|
border-collapse: collapse;
|
|
width: 100%;
|
|
}
|
|
|
|
div#users-contain table td, div#users-contain table th {
|
|
border: 1px solid #eee;
|
|
padding: .6em 10px;
|
|
text-align: left;
|
|
}
|
|
|
|
.ui-dialog .ui-state-error {
|
|
padding: .3em;
|
|
}
|
|
|
|
.validateTips {
|
|
border: 1px solid transparent;
|
|
padding: 0.3em;
|
|
}
|
|
</style>*@
|
|
|
|
|
|
|
|
|
|
@*<nav class="navbar navbar-default" role="navigation">
|
|
<div class="container-fluid">
|
|
<!-- Brand and toggle get grouped for better mobile display -->
|
|
<div class="navbar-header">
|
|
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
|
|
<span class="sr-only">Toggle navigation</span>
|
|
<span class="icon-bar">Help1</span>
|
|
<span class="icon-bar">Help2</span>
|
|
<span class="icon-bar"></span>
|
|
</button>
|
|
<a class="navbar-brand" href="#">Brand</a>
|
|
</div>
|
|
|
|
<!-- Collect the nav links, forms, and other content for toggling -->
|
|
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
|
<ul class="nav navbar-nav">
|
|
<li class="active"><a href="#">Link</a></li>
|
|
<li><a href="#">Link</a></li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#">Action</a></li>
|
|
<li><a href="#">Another action</a></li>
|
|
<li><a href="#">Something else here</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="#">Separated link</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="#">One more separated link</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<form class="navbar-form navbar-left" role="search">
|
|
<div class="form-group">
|
|
<input type="text" class="form-control" placeholder="Search">
|
|
</div>
|
|
<button type="submit" class="btn btn-primary">Submit</button>
|
|
</form>
|
|
<ul class="nav navbar-nav navbar-right">
|
|
<li><a href="#">Link</a></li>
|
|
<li class="dropdown">
|
|
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
|
|
<ul class="dropdown-menu">
|
|
<li><a href="#">Action</a></li>
|
|
<li><a href="#">Another action</a></li>
|
|
<li><a href="#">Something else here</a></li>
|
|
<li class="divider"></li>
|
|
<li><a href="#">Separated link</a></li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</div><!-- /.navbar-collapse -->
|
|
</div><!-- /.container-fluid -->
|
|
</nav>*@
|
|
|
|
|
|
<div id="dialog-form" title="Search Lots">
|
|
<form>
|
|
<fieldset>
|
|
<label for="name">Name</label>
|
|
<input type="text" name="name" id="name" class="text ui-widget-content ui-corner-all">
|
|
<label for="email">Email</label>
|
|
<input type="text" name="email" id="email" value="" class="text ui-widget-content ui-corner-all">
|
|
<label for="password">Password</label>
|
|
<input type="password" name="password" id="password" value="" class="text ui-widget-content ui-corner-all">
|
|
</fieldset>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
<script>
|
|
@*$("#Create").click(function () {
|
|
//getting json data from kendo Grid
|
|
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
|
|
|
//var model = @Html.Raw(Json.Encode(Model))
|
|
|
|
var originatorID = $("#OriginatorID").data("kendoDropDownList").value();
|
|
var title = $("#txtTitle").val();
|
|
alert(title);
|
|
|
|
$.ajax({
|
|
type: "post"
|
|
, url: "/LotDisposition/CreateNew"
|
|
//, data: JSON.stringify({ lots: gridData, lotdispo: model })
|
|
, data: '{lotdispo:' + JSON.stringify(model) + '}'
|
|
|
|
,contentType: 'application/json; charset=utf-8'
|
|
, success: function (result) {
|
|
alert(result.count + " record(s) found");
|
|
}
|
|
});
|
|
});*@
|
|
|
|
//$("#refresh").click(function () {
|
|
// alert("click");
|
|
// var grid = $("#Lots").data("kendoGrid");
|
|
// //grid.dataSource.read(1);
|
|
// grid.dataSource.create();
|
|
|
|
//});
|
|
|
|
|
|
@*$("#refresh").click(function () {
|
|
//getting json data from kendo Grid
|
|
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
|
var modelData=@Html.Raw(val)
|
|
|
|
$.ajax({
|
|
type: "POST"
|
|
, url: "/LotDisposition/SaveGridData"
|
|
, data: JSON.stringify({ lots: gridData, lotdispo: modelData })
|
|
, contentType: "application/json"
|
|
, success: function (result) {
|
|
alert(result.count + " record(s) found");
|
|
}
|
|
});
|
|
|
|
//var vgrid = $("#Lots").data("kendoGrid");
|
|
//var datasource = vgrid.dataSource;
|
|
//var newRecord = { LotNumber: "A123456.1", LotStatusOption: null, WipPartNo: "PN123456", DiePartNo: 1234 };
|
|
////Inserting new row
|
|
//datasource.insert(newRecord);
|
|
|
|
});*@
|
|
|
|
|
|
$("#dialog-form").dialog({
|
|
autoOpen: false,
|
|
show: {
|
|
effect: "blind",
|
|
duration: 500
|
|
},
|
|
hide: {
|
|
effect: "explode",
|
|
duration: 1000
|
|
},
|
|
height: 300,
|
|
width: 350,
|
|
modal: true,
|
|
buttons: {
|
|
"Create an account": function () {
|
|
var bValid = true;
|
|
// allFields.removeClass("ui-state-error");
|
|
$(this).dialog("close");
|
|
},
|
|
Cancel: function () {
|
|
$(this).dialog("close");
|
|
}
|
|
},
|
|
close: function () {
|
|
// allFields.val("").removeClass("ui-state-error")
|
|
}
|
|
});
|
|
|
|
|
|
|
|
$("#create-user")
|
|
.button()
|
|
.click(function () {
|
|
$("#dialog-form").dialog("open");
|
|
return false;
|
|
});
|
|
|
|
|
|
|
|
$("#submit").on('click', function () {
|
|
$('#myModal').modal('hide');
|
|
});
|
|
$('form').submit(function (e) {
|
|
e.preventDefault();
|
|
var gridData = $("#Lots").data("kendoGrid").dataSource.data();
|
|
var originatorID = $("#OriginatorID").data("kendoDropDownList").value();
|
|
var issueNumber = $("#txtIssueNumber").val();
|
|
var peRequired = $("#PERequired").val();
|
|
var title = $("#txtTitle").val();
|
|
var departmentids = $("#DepartmentIDs").data("kendoMultiSelect").value();
|
|
var scrapID = $("#ScrapID").data("kendoDropDownList").value();
|
|
var responsibilityAreaID = $("#ResponsibilityAreaID").data("kendoDropDownList").value();
|
|
var spnScrapCode = $("#txtSPNScrapCode").val();
|
|
var issueDescription = $("#txtIssueDescription").val();
|
|
var reasonForDisposition = $("#txtReasonForDisposition").val();
|
|
|
|
//alert(spnScrapCode);
|
|
|
|
$.ajax({
|
|
//url: '/LotDisposition/Create',
|
|
type: "POST",
|
|
dataType: "json",
|
|
contentType: "application/json; charset=utf-8",
|
|
data: JSON.stringify(
|
|
{
|
|
Lots: gridData,
|
|
Title: title,
|
|
OriginatorID: originatorID,
|
|
//IssueNumber: issueNumber,
|
|
PERequired: peRequired,
|
|
DepartmentIds: departmentids,
|
|
ScrapID: scrapID,
|
|
ResponsibilityAreaID: responsibilityAreaID,
|
|
SPNScrapCode: spnScrapCode,
|
|
IssueDescription: issueDescription,
|
|
ReasonForDisposition: reasonForDisposition
|
|
|
|
}),
|
|
success: function (result) {
|
|
|
|
alert("success " + result.UserName);
|
|
},
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
alert("Failed " + jqXHR.responseText);
|
|
|
|
}
|
|
|
|
});
|
|
return false;
|
|
});
|
|
|
|
</script> |