Skip to content

Commit

Permalink
step one code change
Browse files Browse the repository at this point in the history
  • Loading branch information
khmukid committed Oct 13, 2015
1 parent da25b8f commit cbed0b1
Show file tree
Hide file tree
Showing 8 changed files with 55 additions and 10 deletions.
Binary file modified PSTU.v12.suo
Binary file not shown.
2 changes: 1 addition & 1 deletion PSTU/Contents/Scripts/ngControllers/loginController.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pstuApp.controller('loginController', function ($scope, loginService) {
pstuApp.controller('loginController', function ($scope,$window, loginService) {
$scope.isLoggedIn = false;

$scope.login = function () {
Expand Down
28 changes: 28 additions & 0 deletions PSTU/Contents/Scripts/ngControllers/stepController.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
pstuApp.controller('stepController', function ($scope, $window) {

$scope.registration_no = Math.floor((Math.random() * 100000) + 01);
$scope.admit_date = getCurrentFullDate();

//return current date
function getCurrentFullDate()
{
var today = new Date();
var dd = today.getDate();
var mm = today.getMonth() + 1; //January is 0!
var yyyy = today.getFullYear();

if (dd < 10) {
dd = '0' + dd
}

if (mm < 10) {
mm = '0' + mm
}

return dd + '-' + mm + '-' + yyyy;
}

$scope.init = function () {
//console.log('goo')
}
})
1 change: 1 addition & 0 deletions PSTU/PSTU.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@
<Content Include="Contents\Scripts\Lib\morris-data.js" />
<Content Include="Contents\Scripts\Lib\sb-admin-2.js" />
<Content Include="Contents\Scripts\ngControllers\loginController.js" />
<Content Include="Contents\Scripts\ngControllers\stepController.js" />
<Content Include="Contents\Scripts\ngServices\loginService.js" />
<Content Include="Global.asax" />
<Content Include="Contents\Scripts\Lib\angular.min.js" />
Expand Down
4 changes: 2 additions & 2 deletions PSTU/Views/Login/Login.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
<input class="form-control" placeholder="Password" ng-model="password" name="password" type="password" value="">
</div>

<div class="checkbox">
@*<div class="checkbox">
<label>
<input name="remember" type="checkbox" value="Remember Me">Remember Me
</label>
</div>
</div>*@

<input type="submit" name="login" class="btn btn-lg btn-success btn-block" value="Login" ng-click="login();">
</fieldset>
Expand Down
4 changes: 3 additions & 1 deletion PSTU/Views/Shared/_MasterLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,12 @@
<script src="~/Contents/Scripts/app.js"></script>
<script src="~/Contents/Scripts/ngServices/loginService.js"></script>
<script src="~/Contents/Scripts/ngControllers/loginController.js"></script>
<script src="~/Contents/Scripts/ngControllers/stepController.js"></script>

</head>

<body>
<div id="wrapper">
<div id="wrapper" ng-app="pstuApp">

<!-- Navigation -->
<nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
Expand Down
8 changes: 3 additions & 5 deletions PSTU/Views/Steps/Step.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
ViewBag.Title = "Step";
Layout = "~/Views/Shared/_MasterLayout.cshtml";
}
<div class="container-fluid">
<div class="container-fluid" ng-controller="stepController">
<div class="row">
<div class="col-lg-12">
<div class="well-lg">
<a href="#" class="btn btn-success" >List</a>
</div>
@RenderPage("Step" + ViewData["step_id"]+".cshtml");
<h3 style="text-align:center">Clinical Case Record</h3>
@RenderPage("Step" + ViewData["step_id"] + ".cshtml");
</div>
<!-- /.col-lg-12 -->
</div>
Expand Down
18 changes: 17 additions & 1 deletion PSTU/Views/Steps/Step1.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,21 @@
Step 1
</div>
<div class="panel-body">
<div class="col-lg-12">a</div>
<div class="col-lg-5">
<div class="form-group">
<label>Reg. No: </label>
<input type="number" class="form-control" @*ng-init="registration_no="*@ ng-model="registration_no">
{{registration_no}}
</div>
</div>
<div class="col-lg-5 right">
<div class="form-group">
<label>Date: </label>
<input class="form-control" ng-model="admit_date">
{{admit_date}}
</div>

</div>
<div class="col-lg-5">b</div>
<div class="col-lg-5">c</div>
</div>
Expand All @@ -14,3 +28,5 @@
</div>




0 comments on commit cbed0b1

Please sign in to comment.