Professional Documents
Culture Documents
Entity;
@model IEnumerable<RealForum.Models.POSTLISTING>
@{
ApplicationDbContext db = new ApplicationDbContext();
<style>
.drop-down {
position: relative;
}
.selected {
width: 100px;
border: 1px solid #eee;
padding: 2px 5px;
cursor: pointer;
}
.options {
position: absolute;
width: 100px;
bottom: -50px;
left: 0;
display: none;
border: 1px solid #eee;
border-top: none;
list-style: none;
margin: 0;
padding: 0;
bottom: -250px;
padding-left: 10px;
}
.options.show {
display: block;
}
.options li {
background: white;
cursor: pointer;
padding: 3px;
}
.options li:hover {
background: #FFEA32;
}
.dropdown-menu .dropdown-item {
white-space: normal;
}
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
th, td {
padding: 15px;
}
body {
font-family: "Open Sans", sans-serif;
line-height: 1.25;
}
table {
border: 1px solid #ccc;
border-collapse: collapse;
margin: 0;
padding: 0;
width: 100%;
table-layout: fixed;
}
table caption {
font-size: 1.5em;
margin: .5em 0 .75em;
}
table tr {
background-color: #f8f8f8;
border: 1px solid #ddd;
padding: .35em;
border-color: black;
}
table th,
table td {
padding: .625em;
text-align: center;
}
table th {
font-size: .85em;
letter-spacing: .1em;
text-transform: uppercase;
}
.dropbtn {
background-color: white;
color: black;
padding: 0px;
font-size: 16px;
cursor: pointer;
}
.dropbtn:hover, .dropbtn:focus {
background-color: wheat;
}
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-content {
display: none;
position: absolute;
background-color: #f1f1f1;
min-width: 160px;
overflow: auto;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a {
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
}
.dropdown a:hover {
background-color: #ddd;
}
.show {
display: block;
}
.historybtn {
background: black;
color: white;
width: 74%;
cursor: pointer;
font-family: montserrat;
font-weight: 600;
}
.for-sale {
font-family: montserrat;
}
.detailinfo {
font-size: small;
line-height: 18px;
margin-bottom: 0%;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-family: montserrat;
}
.maindiv {
padding: 0px;
margin-bottom: 0px;
height: auto;
}
.titlediv {
margin-bottom: 0px;
margin-top: -1.5%;
font-family: montserrat;
}
.precinctimage {
max-width: 100%;
height: 210px;
}
.constructionstatus {
background: black;
color: gold;
padding: 10px;
text-align: center;
}
.NewOffer {
font-size: small;
line-height: 18px;
margin-bottom: 0%;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-family: montserrat;
}
.row {
margin-bottom: 2px;
}
</style>
@*@Html.Partial("MP_PartialModalView")*@
</div>
<div class="modal-footer ">
<a data-toggle="modal" href="#myBtnn2" class="btn
btn-success"><span class="glyphicon glyphicon-ok-sign"></span> Ok, Continue</a>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
</div>
<div class="modal-footer ">
<button type="button" class="btn btn-success"><span
class="glyphicon glyphicon-ok-sign"></span> Send Message</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
@*for negotiation history*@
</div>
@for (int i = 0; i < offerdata.Count; i++)
{
<div class="row" style="background-color:black; color:white;
margin-bottom:1px; margin-top:-4px">
@{
int num = i + 1;
long offerid = offerdata[i].Offer_Id;
var responcedata = db.Offers_Response_Details.Include(a =>
a.Responses_Offers).Where(a => a.Offer_id == offerid).OrderByDescending(a =>
a.ORD_id).FirstOrDefault();
string responcestring =
responcedata.Responses_Offers.ResponseSelect_BuyerSellerSide;
}
else
{
<div class="drop-down" style="background-color:
white;margin-bottom: 5px;">
}
else
{
<button class="w3-btn w3-black" id="5"
onclick="submitresponce(this.id)" style="background-color:green; color: white;
font-size:12px; font-weight: bolder; width:100px; height:38px;">Send My
Response</button>
}
</div>
<div class="col-md-2">
<button id="@offerid" onclick="showmodel(this.id)"
class="w3-btn w3-teal" style="background-color: black; color: yellow; font-
size:smaller; font-weight: 600; width:100%; height:38px;">Show Negotiation
History</button>
</div>
</div>
@{
var responcesHistory =
db.Offers_Response_Details.Include(a => a.Responses_Offers).Where(a => a.Offer_id
== offerid).ToList();
}
<table>
<thead>
<tr>
<th scope="col">Date</th>
<th scope="col">Time</th>
<th scope="col">Update From</th>
<th scope="col">Additional Remarks</th>
</tr>
</thead>
@for (int j = 0; j < responcesHistory.Count; j+
+)
{
<tr>
<td data-
label="Account">@responcesHistory[j].ORD_ED.Date.ToString("dd/MM/yyyy")</td>
<td data-label="Due
Date">@responcesHistory[j].ORD_ED.ToString("hh:mm tt")</td>
<td data-
label="Amount">@responcesHistory[j].Sender</td>
<td data-
label="Period">@responcesHistory[j].Responses_Offers.ResponseSelect_BuyerSellerSide
</td>
</tr>
}
</table>
@*<p id="myBtn"> </p><br /><br /><br />
<p id="myBtn"></p><br />*@
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
</div>
<script>
function inWords(num) {
if ((num = num.toString()).length > 9) return 'overflow';
n = ('000000000' + num).substr(-9).match(/^(\d{2})(\d{2})
(\d{2})(\d{1})(\d{2})$/);
if (!n) return; var str = '';
str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + ' ' +
a[n[1][1]]) + 'crore ' : '';
str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + ' ' +
a[n[2][1]]) + 'lac ' : '';
str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + ' ' +
a[n[3][1]]) + 'thousand ' : '';
str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + ' ' +
a[n[4][1]]) + 'hundred ' : '';
str += (n[5] != 0) ? ((str != '') ? 'and ' : '') +
(a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
return str;
}
$
("."+@offerdata[i].Offer_Id).html(inWords("@offerdata[i].OfferAmount)"));
</script>
}
</div>
<script>
var addid = 1;
var status = "Actice"
$(".table-link").click(function () {
addid = $(this).attr('data-id');
status = $(this).attr('data-status');
var rowid = "#" + addid;
var row = $(this).closest(rowid);
var msg = "";
if (status == "Approved") {
msg = "Do you really want to Approve $ Accept this
offer?";
}
else {
msg = "Do you really want to " + status + " this
offer?"
}
$(".negotiatehistory").click(function () {
//Modal Function in PartialModalView File
addid = $(this).attr('data-id');
ShowShareModal(addid);
});
$(".investhistory").click(function () {
//Modal Function in PartialModalView File
addid = $(this).attr('data-id');
ShowInvestModal(addid);
});
$(".constructionstatus").click(function () {
//Modal Function in PartialModalView File
addid = $(this).attr('data-id');
ShowGallery(addid);
});
document.getElementById("myDropdown").classList.toggle("show");
}
var a = ['', 'one ', 'two ', 'three ', 'four ', 'five ',
'six ', 'seven ', 'eight ', 'nine ', 'ten ', 'eleven ', 'twelve ', 'thirteen ',
'fourteen ', 'fifteen ', 'sixteen ', 'seventeen ', 'eighteen ', 'nineteen '];
var b = ['', '', 'twenty', 'thirty', 'forty', 'fifty',
'sixty', 'seventy', 'eighty', 'ninety'];
function inWords(num) {
if ((num = num.toString()).length > 9) return
'overflow';
n = ('000000000' + num).substr(-9).match(/^(\d{2})
(\d{2})(\d{2})(\d{1})(\d{2})$/);
if (!n) return; var str = '';
str += (n[1] != 0) ? (a[Number(n[1])] || b[n[1][0]] + '
' + a[n[1][1]]) + 'crore ' : '';
str += (n[2] != 0) ? (a[Number(n[2])] || b[n[2][0]] + '
' + a[n[2][1]]) + 'lac ' : '';
str += (n[3] != 0) ? (a[Number(n[3])] || b[n[3][0]] + '
' + a[n[3][1]]) + 'thousand ' : '';
str += (n[4] != 0) ? (a[Number(n[4])] || b[n[4][0]] + '
' + a[n[4][1]]) + 'hundred ' : '';
str += (n[5] != 0) ? ((str != '') ? 'and ' : '') +
(a[Number(n[5])] || b[n[5][0]] + ' ' + a[n[5][1]]) + 'only ' : '';
return str;
}
$
(".classdemandedprice").html(inWords("@item.TotalPaybleToSeller"));
$
(".classofferprice").html(inWords("@offerdata[0].OfferAmount)"));
function formatNumber(n) {
// format number 1000000 to 1,234,567
return n.replace(/\D/g, "").replace(/\B(?=(\d{3})+
(?!\d))/g, ",")
}
// original length
var original_len = input_val.length;
// join number by .
input_val = left_side + "." + right_side;
} else {
// no decimal entered
// add commas to number
// remove all non-digits
input_val = formatNumber(input_val);
input_val = input_val;
// final formatting
if (blur === "blur") {
input_val += ".00";
}
}
function submitresponce(id){
//alert(id);
var responceid = document.getElementById(id).value;
var responcetext =
document.getElementById(id).innerHTML;
//alert(responceid);
if(responceid=="29" || responceid=="30")
{
$('#myBtn').modal('show');
}
else
{
$.ajax({
url: '/API/OffersAPI/SubmitResponce?
offerid='+id+'&responceid='+responceid,
data: { offerid: id, responceid: responceid},
type: 'post'
}).done(function (response) {
//alert(response);
if (response == "Success") {
alert('Responce Sent Succesfully!')
//window.location.reload();
}
else {
$('.selected').on('click', function () {
$('.options').toggleClass('show');
});
</script>
}
}