Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions Week1-Project/Shreya009/Untitled-1
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<html>
<head>

<script>
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
$.ajax({
type: 'GET',
url: 'http://http://localhost:58266/api/Employees',
success: function(data) {
extresults = data;
console.log(extresults);
}
});

$.ajax({
type: 'POST',
url: 'http://http://localhost:58266/api/Employees',
data: {"la" : "lala"},
success: function(data) {
alert("post is good");
}
});

</script>
</head>


\*using System.Web.Http.Cors;
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);*\


67 changes: 67 additions & 0 deletions Week1-Project/Shreya009/Untitled-1.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<html>
<head>

<script>
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
$.ajax({
type: 'GET',
url: 'http://http://localhost:58266/api/Employees',
success: function(data) {
extresults = data;
console.log(extresults);
}
});

$.ajax({
type: 'POST',
url: 'http://http://localhost:58266/api/Employees',
data: {"la" : "lala"},
success: function(data) {
alert("post is good");
}
});

</script>
</head>
</html>


\*using System.Web.Http.Cors;
var cors = new EnableCorsAttribute("*", "*", "*");
config.EnableCors(cors);*\



function hello(){
var fname=documanet.getElementById("fname").value;
var fname=documanet.getElementById("fname").value;
var fname=documanet.getElementById("fname").value;
var fname=documanet.getElementById("fname").value;
var fname=documanet.getElementById("fname").value

var dataToSend={
"FirstName":fname,
"LastName":lname;

}


}


$ajax({
url:"localhost",
data:DataToSend,
type:'post',
success:function(res){

console.log(res);

}



})

45 changes: 38 additions & 7 deletions Week1-Project/Shreya009/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,42 @@
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
</script>
<title>
create
</title>
<link rel="stylesheet" type="text/css" href="style.css">
<script>

function post(){
var id=document.getElementById("id").value;
var des=document.getElementById("des").value;
var qual=document.getElementById("qual").value;
var exp=document.getElementById("exp").value;

var dts={
"ID":id,
"Designation":des,
"Qualification":qual,
"Experience":exp,

}

$.ajax({
url:"http://localhost:51442/api/Profiles",
data:dts,
type:'post',
dataType:'json',
success:function(res){
console.log(res);
alert("Account Created");
}
})
}
</script>
</head>
<body>
<div class="text">
Expand All @@ -21,26 +53,25 @@ <h3>&nbsp CREATE PROFILE &nbsp</h3>


<form>
<input class="formname" type="text" placeholder="First Name">
<input class="formname" type="text" placeholder="Last Name">
<input class="formname" type="text" placeholder="Name" id="name">
<input class="formname" type="text" placeholder="ID" id="id">
<br>
<br>
<input class="formmid" type="text" placeholder="Designation" length="48">
<input class="formmid" type="text" placeholder="Designation" length="48" id="des">

<br>
<br>
<input class="formmid" type="text" placeholder="Qualification">
<input class="formmid" type="text" placeholder="Qualification" id="qual">

<br>
<br>
<input class="formmid" type="text" placeholder="Experience" id="exp">

<textarea rows="4" cols="48" name="Experience" placeholder="Experience">
</textarea>

<br>
<br>
<br>
<input type="submit" value="Update">
<input type="button" value="Create" onclick="post()">


</form>
Expand Down
121 changes: 47 additions & 74 deletions Week1-Project/Shreya009/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,47 @@
list
</title>
<link rel="stylesheet" type="text/css" href="style.css">

<script src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous"></script>

<script>


// retrieve91.html?id=' "retrieve91.html' + data[i].ID+ '">'

$.ajax({
type: 'GET',
url: 'http://localhost:51442/api/Profiles',
success: function(profiles) {

$.ajax({
type: 'GET',
url: 'http://localhost:51442/api/SignUps',
success: function(signUps) {
configureTable(signUps,profiles)
}
});
}
});

function configureTable(signUps,profiles){
for(i=0; i<profiles.length;i++){
$('#profiles').append(
'<tr><td id = "Name">' + signUps[i].FName + signUps[i].LName+
'</td><td id = "EmployeeId"><a href="retreive91.html?id=' + profiles[i].ID + '">' + profiles[i].ID + '</a>' +
'</td><td id = "Designation">' + profiles[i].Designation +
'</td><td id = "Qualification">' + profiles[i].Qualification +
'</td><td id = "Experience">' + profiles[i].Experience +
'</td></tr>'
);
}
}



</script>
</head>
<body>
<div class="text">
Expand All @@ -22,84 +63,16 @@

<h3>&nbsp EMPLOYEE LIST &nbsp</h3>

<table align="center" cellspacing="12">
<table align="center" cellspacing="12" id="profiles">
<tr>
<th>ID</th>
<th>Name</th>
<th>ID</th>
<th>Designation</th>
<th>Deparment</th>
<th width="10px">Contact</th>
</tr>
<tr>
<td>191001</td>
<td><a href="retreive91.html">Nick Fury</a></td>
<td>Project Manager</td>
<td>Strategy</td>
<td>9119119110</td>
</tr>
<tr>
<td>190002</td>
<td><a href=#>Steve Rogers</a></td>
<td>Soldier</td>
<td>Defence</td>
<td>1001001001</td>
</tr>
<tr>
<td>110093</td>
<td><a href=#>Natasha Romanoff</a></td>
<td>Spying</td>
<td>Assassination</td>
<td>Contact</td>
</tr>
<tr>
<td>110094</td>
<td><a href=#>Bruce Banner</a></td>
<td>Scientist</td>
<td>Science</td>
<td>0010010010</td>
</tr>
<tr>
<td>110095</td>
<td><a href=#>Clint Barton</a></td>
<td>Shooter</td>
<td>Assassination</td>
<td>6666665555</td>
</tr>
<tr>
<td>110096</td>
<td><a href=#>Anthony Stark</a></td>
<td>Scientist</td>
<td>Engineering</td>
<td>4444333221</td>
</tr>
<tr>
<td>110097</td>
<td><a href=#>Thor Odinson</a></td>
<td>God</td>
<td>Thunder</td>
<td>0000000000</td>
</tr>
<tr>
<td>110098</td>
<td><a href=#>Wanda Maximoff</a></td>
<td>Manupulation</td>
<td>Psychology</td>
<td>8888777766</td>
</tr>
<tr>
<td>110099</td>
<td><a href=#>Pietro Maximoff</a></td>
<td>Running</td>
<td>Speed</td>
<td>8888777766</td>
</tr>
<tr>
<td>110100</td>
<td><a href=#>Thanos Titan</a></td>
<td>Power</td>
<td>Destruction</td>
<td>6660006660</td>
<th>Qualification</th>
<th>Experience</th>
</tr>


</table>

<div class="footer">
Expand Down
Loading