Kendo MVC
Edit View
@using Kendo.Mvc.UI
@{
ViewBag.Title = "EditLead";
Layout = "~/Views/Shared/_FinalMasterLayout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title></title>
<script>
$(window).load(function () {
var dropDown = $("#ddlempsel").data("kendoDropDownList");
dropDown.enable(false);
var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
dropDown1.enable(false);
var refer = $("#txthiderefer").val();
if (refer == 'Employee') {
dropDown.enable(true);
}
else if (refer == 'Customer') {
dropDown1.enable(true);
}
else if ($("#txtotherRef").val() != '') {
$("#txtotherRef").show();
}
debugger
var pht = $("#txthidePhoto").val();
if (pht != '')
{
$('#imageupload').src = pht;
document.getElementById("imageupload").src = pht;
}
$("#emp_chk").bind("click", function () {
var dropDown = $("#ddlempsel").data("kendoDropDownList");
dropDown.enable(true);
var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
dropDown1.enable(false);
$("#txtotherRef").hide(1000);
});
$("#cus_chk").bind("click", function () {
var dropDown = $("#ddlempsel").data("kendoDropDownList");
dropDown.enable(false);
var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
dropDown1.enable(true);
$("#txtotherRef").hide(1000);
});
$("#top_div").scrollTop(0);
});
function onClickOther(e) {
var dropDown = $("#ddlempsel").data("kendoDropDownList");
dropDown.enable(false);
var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
dropDown1.enable(false);
$("#txtotherRef").show(1000);
}
</script>
<script type="text/javascript">
function isNumberKey(evt) {
var charCode = (evt.which) ? evt.which : event.keyCode;
if (charCode != 46 && charCode > 31
&& (charCode < 48 || charCode > 57))
return false;
//$("#errormsg").html("Digits Only").show().fadeOut("slow");
return true;
}
function isCharacterKey(evt) {
if ((event.keyCode > 64 && event.keyCode < 91) || (event.keyCode > 96 && event.keyCode < 123) || event.keyCode == 8)
return true;
else {
//alert("Please enter only char");
return false;
}
}
</script>
<script>
$(document).ready(function () {
$("#txtotherRef").hide();
$("#addbtnDel1").hide();
$("#addbtnDel2").hide();
$("#addbtnDel3").hide();
$("#addbtnDel4").hide();
$("#add_panel2").hide();
$("#add_panel3").hide();
$("#add_panel4").hide();
$("#addbtnPlus1").click(function () {
$("#addbtnDel1").show();
$("#addbtnPlus1").hide();
$("#add_panel2").show(1000);
});
$("#addbtnDel1").click(function () {
$("#addbtnPlus1").show();
$("#addbtnDel1").hide();
$("#add_panel2").hide(1000);
});
$("#addbtnPlus2").click(function () {
$("#addbtnDel2").show();
$("#addbtnPlus2").hide();
$("#add_panel3").show(1000);
});
$("#addbtnDel2").click(function () {
$("#addbtnPlus2").show();
$("#addbtnDel2").hide();
$("#add_panel3").hide(1000);
});
$("#addbtnPlus3").click(function () {
$("#addbtnDel3").show();
$("#addbtnPlus3").hide();
$("#add_panel4").show(1000);
});
$("#addbtnDel3").click(function () {
$("#addbtnPlus3").show();
$("#addbtnDel3").hide();
$("#add_panel4").hide(1000);
});
});
</script>
<script language="javascript" type="text/javascript">
var PhoneuniqueId = 1;
var EmailuniqueId = 1;
function AddPhone_onclick() {
debugger
$test = $("#div_AddPhone").clone().prependTo(".add_phonepanel");
$test.find("#ddlLeadPhoneType").kendoDropDownList().each(function () {
this.id += PhoneuniqueId
$test.find("#ddlLeadPhoneType" + PhoneuniqueId + "").kendoDropDownList({
Name: ("ddlLeadPhoneType" + PhoneuniqueId + ""),
dataTextField: "text",
dataValueField: "value",
dataSource:
[
{ text: "Business", value: "Business" },
{ text: "Home", value: "Home" },
{ text: "Mobile", value: "Mobile" },
{ text: "Other", value: "Other" }
]
});
});
$test.find("#div_AddPhonePanel").each(function () { this.id += PhoneuniqueId });
$test.find("#txtConPhone").each(function () { this.id += PhoneuniqueId });
$test.find("#Phone_Del").css('display', 'inline');
$test.find("#Phone_Del").each(function () { this.id += PhoneuniqueId });
PhoneuniqueId++;
}
function Phone_Del_Click(e) {
debugger
var deleteid = e.id;
var unId = deleteid.substring(9);
$("#div_AddPhonePanel" + unId + "").remove();
PhoneuniqueId--;
}
function AddEmail_onclick() {
debugger
$test = $("#div_AddEmail").clone().prependTo(".add_emailpanel");
$test.find("#ddlLeadEmailType").kendoDropDownList().each(function () {
this.id += EmailuniqueId
$test.find("#ddlLeadEmailType" + EmailuniqueId + "").kendoDropDownList({
Name: ("ddlLeadEmailType" + EmailuniqueId + ""),
dataTextField: "text",
dataValueField: "value",
dataSource:
[
{ text: "Business", value: "Business" },
{ text: "Home", value: "Home" },
{ text: "Mobile", value: "Mobile" },
{ text: "Other", value: "Other" }
]
});
});
$test.find("#div_AddEmailPanel").each(function () { this.id += EmailuniqueId });
$test.find("#txtConEmail").each(function () { this.id += EmailuniqueId });
$test.find("#Email_Del").css('display', 'inline');
$test.find("#Email_Del").each(function () { this.id += EmailuniqueId });
EmailuniqueId++;
}
function Email_Del_Click(e) {
debugger
var deleteid = e.id;
var unId = deleteid.substring(9);
$("#div_AddEmailPanel" + unId + "").remove();
EmailuniqueId--;
}
</script>
@*------Popup Show-----*@
<script>
function onClose1() {
$("#leadTypeAdd").show();
$("#leadSouceAdd").show();
$("#leadAssignSearch").show();
$("#leadreffereddBy").show();
$("#LeadTerritoryAdd").show();
$("#LeadcampaignAdd").show();
$("#LeadcustomerAdd").show();
$("#LeadempAdd").show();
$("#LeadindustryAdd").show();
$("#LeadaddressTypAdd").show();
}
$(document).ready(function () {
$("#leadTypeAdd").bind("click", function () {
$("#popupLeadtype").data("kendoWindow").center().open();
$("#leadTypeAdd").show();
});
$("#leadSouceAdd").bind("click", function () {
$("#popupLeadsource").data("kendoWindow").center().open();
$("#leadSouceAdd").show();
});
$("#leadAssignSearch").bind("click", function () {
$("#popupLeadAssign").data("kendoWindow").center().open();
$("#leadAssignSearch").show();
});
$("#leadreffereddBy").bind("click", function () {
$("#popupLeadreffered").data("kendoWindow").center().open();
$("#leadreffereddBy").show();
});
$("#LeadTerritoryAdd").bind("click", function () {
$("#popupLeadterritory").data("kendoWindow").center().open();
$("#LeadTerritoryAdd").show();
});
$("#LeadcampaignAdd").bind("click", function () {
$("#popupLeadcampaign").data("kendoWindow").center().open();
$("#LeadcampaignAdd").show();
});
$("#LeadcustomerAdd").bind("click", function () {
$("#popupLeadcustomer").data("kendoWindow").center().open();
$("#LeadcustomerAdd").show();
});
$("#LeadempAdd").bind("click", function () {
$("#popupLeademp").data("kendoWindow").center().open();
$("#LeadempAdd").show();
});
$("#LeadindustryAdd").bind("click", function () {
$("#popupLeadindustry").data("kendoWindow").center().open();
$("#LeadindustryAdd").show();
});
$("#LeadaddressTypAdd").bind("click", function () {
$("#popupLeadAddressTyp").data("kendoWindow").center().open();
$("#LeadaddressTypAdd").show();
});
});
</script>
<style>
/* Tooltip container */
.Mytooltip {
position: relative;
display: inline-block;
}
.Mytooltip a {
color: #4a8bf5;
}
/* Tooltip text */
.Mytooltip .Mytooltiptext {
visibility: hidden;
width: 120px;
background-color: #524e4e;
color: #fff;
text-align: center;
padding: 5px 0;
border-radius: 6px;
/* Position the tooltip text - see examples below! */
position: absolute;
z-index: 1;
}
/* Show the tooltip text when you mouse over the tooltip container */
.Mytooltip:hover .Mytooltiptext {
visibility: visible;
}
.Upper_strip {
width: 100%;
height: 36px;
background-color: #ebe9e9;
border: 1px solid #b9b9b9;
padding: 3px;
background-image: none,linear-gradient(to bottom,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
background-image: none,-o-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
background-image: none,-moz-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
background-image: none,-webkit-linear-gradient(top,rgba(255,255,255,0) 0,rgba(255,255,255,.6) 100%);
}
.Upstrip {
color: #4a8bf5;
font-size: 11px;
}
.k-filename {
display: inline-block;
min-width: 120px;
max-width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.k-widget, .k-upload, .k-header {
padding: 0px;
}
.k-dropzone {
padding: 4px;
height: 23px;
}
.k-file {
padding: 0px !important;
font-size: 11px;
}
.k-upload-selected {
padding: 3px;
font-size: 11px;
margin: 3px;
}
.k-upload-files {
margin: 0px;
}
.k-upload-button {
font-size: 11px;
}
</style>
@*------Ribbon Save-----*@
<script>
function savebtn(e) {
debugger
//var validator = $("#top_div").kendoValidator().data("kendoValidator");
//if (validator.validate()) {
//} else {
// return false;
//}
//---T_crm_Lead---\\
var obj = $("#ddlLeadTitle").val();
var obj1 = $("#txtFirstName").val();
var obj2 = $("#txtLastName").val();
var objMiddle = $("#txtMiddleName").val();
var obj3 = $("#txtJobTitle").val();
var obj4 = $("#ddlBestwaytoContact").val();
var obj5 = $("#ddlLeadStatus").val();
var obj6 = $("#ddlLeadSource").val();
var obj7 = $("#ddlLeadType").val();
var obj8;
var obj9 = $("#txtAssignedTo").val();
var obj10 = $("#EditorLeadDescription").val();
var empid = null;
var cusid = null;
var othertxt = null;
if ($('#ddlempsel').is(':enabled')) {
empid = $("#ddlempsel").val();
obj8 = 'Employee';
}
else if ($('#ddlCussel').is(':enabled')) {
cusid = $("#ddlCussel").val();
obj8 = 'Customer';
}
else {
othertxt = $("#txtotherRef").val();
obj8 = 'Other';
}
var objtopic = $("#txttopic").val();
var objPhoto = $("#LeadImage").val();
var obj10 = $("#EditorLeadDescription").val();
//---T_crm_LeadConactInformation---\\
var obj11 = $("#ddlLeadPhoneType").val();
var obj12 = $("#txtPhone").val();
var obj13 = $("#ddlLeadEmailType").val();
var obj14 = $("#txtEmail").val();
var obj15 = $("#txtSkype").val();
var obj16 = $("#txtFax").val();
//---T_crm_LeadAdditionalInformation---\\
var obj17 = $("#txtPotentialAmt").val();
//var obj18 = $("#txtCurTyp").val();
var obj19 = $("#editdtpEstClgDt").val();
var obj20 = $("#ddlRank").val();
var obj21 = $("#ddlCampaign").val();
var obj22 = $("#ddlTeritory").val();
//--- T_crm_LeadBussines---\\
var obj23 = $("#ddlCustomer").val();
var obj24 = $("#ddlIndustry").val();
var obj25 = $("#txtCompany").val();
var obj26 = $("#txtNoOfEmp").val();
var obj27 = $("#txtAnnualRev").val();
//--- T_crm_LeadAddressInformation---\\
//var obj28 = $("#ddlAddressType").val();
//var obj29 = $("#txtAddressLine1").val();
//var obj30 = $("#txtAddressLine2").val();
//var obj31 = $("#ddlCityName").val();
//var obj32 = $("#ddlDistName").val();
//var obj33 = $("#ddlStateName").val();
//var obj34 = $("#ddlCountryName").val();
//var obj35 = $("#txtZipCode").val();
//var obj36 = $("#txtDelInstn").val();
//--- T_crm_LeadAddressInformation1---\\
var objadd1 = $("#ddlAddressType").val();
var objadd2 = $("#txtAddressLine1").val();
//var objadd3 = $("#txtAddressLine2").val();
var objadd4 = $("#txtCity").val();
//var objadd5 = $("#ddlDistName").val();
var objadd6 = $("#ddlStateName").val();
var objadd7 = $("#ddlCountryName").val();
var objadd8 = $("#txtZipCode").val();
var objadd9 = $("#txtDelInstn").val();
//--- T_crm_LeadAddressInformation2---\\
var objadd10 = $("#ddlAddressType2").val();
var objadd11 = $("#txtAddressLine12").val();
//var objadd12 = $("#txtAddressLine22").val();
var objadd13 = $("#txtCity2").val();
//var objadd14 = $("#ddlDistName").val();
var objadd15 = $("#ddlStateName2").val();
var objadd16 = $("#ddlCountryName2").val();
var objadd17 = $("#txtZipCode2").val();
var objadd18 = $("#txtDelInstn2").val();
//--- T_crm_LeadAddressInformation3---\\
var objadd19 = $("#ddlAddressType3").val();
var objadd20 = $("#txtAddressLine13").val();
var objadd21 = $("#txtAddressLine23").val();
var objadd22 = $("#txtCity3").val();
//var objadd23 = $("#ddlDistName").val();
var objadd24 = $("#ddlStateName3").val();
var objadd25 = $("#ddlCountryName3").val();
var objadd26 = $("#txtZipCode3").val();
var objadd27 = $("#txtDelInstn3").val();
//--- T_crm_LeadAddressInformation4---\\
var objadd28 = $("#ddlAddressType4").val();
var objadd29 = $("#txtAddressLine14").val();
// var objadd30 = $("#txtAddressLine24").val();
var objadd31 = $("#txtCity4").val();
//var objadd32 = $("#ddlDistName").val();
var objadd33 = $("#ddlStateName4").val();
var objadd34 = $("#ddlCountryName4").val();
var objadd35 = $("#txtZipCode4").val();
var objadd36 = $("#txtDelInstn4").val();
//--- T_crm_LeadSocialInformation---\\
var obj37 = $("#txtFacebook").val();
var obj38 = $("#txtTwitter").val();
var obj39 = $("#txtLinkedin").val();
var obj40 = $("#txtWebsite").val();
var ddlPhType, txtLeadPhNo, ddlEmType, txtLeadEmail;
for (c = 0 ; c < PhoneuniqueId; c++) {
if (c == 0) {
ddlPhType = $("#ddlLeadPhoneType").val();
txtLeadPhNo = $("#txtConPhone").val();
}
else {
ddlPhType += "," + $("#ddlLeadPhoneType" + c + "").val();
txtLeadPhNo += "," + $("#txtConPhone" + c + "").val();
}
}
for (d = 0 ; d < EmailuniqueId; d++) {
if (d == 0) {
ddlEmType = $("#ddlLeadEmailType").val();
txtLeadEmail = $("#txtConEmail").val();
}
else {
ddlEmType += "," + $("#ddlLeadEmailType" + d + "").val();
txtLeadEmail += "," + $("#txtConEmail" + d + "").val();
}
}
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: '/LeadDetails/EditLeadSave',
data: '{"ClientId":"' + 'SWASH'
+ '","Title":"' + obj + '","FirstName":"' + obj1 + '","LastName":"' + obj2
+ '","JobTitle":"' + obj3 + '","BestWayToContact":"' + obj4 + '","StatusId":"' + obj5
+ '","SourceId":"' + obj6 + '","LeadTypeId":"' + obj7 + '","ReferredBy":"' + obj8
+ '","SalesRepEmployeeId":"' + obj9 + '","Description":"' + obj10
+ '","PhoneType":"' + ddlPhType
+ '","PhoneNo":"' + txtLeadPhNo + '","EmailType":"' + ddlEmType + '","EmailId":"' + txtLeadEmail
+ '","MiddleName":"' + objMiddle + '","Topic":"' + objtopic + '","SalesRepresentativeId":"' + obj9
+ '","Rating":"' + obj20 + '","Photo":"' + objPhoto + '","EmployeeId":"' + empid
+ '","CustomerId":"' + cusid + '","Other":"' + othertxt
+ '","Skype":"' + obj15 + '","Fax":"' + obj16 + '","PotentialAmount":"' + obj17
+ '","EstimatedCloseDate":"' + obj19 + '","CampaignId":"' + obj21
+ '","TerritoryId":"' + obj22 + '","IndustryId":"' + obj24
+ '","Company":"' + obj25 + '","NoOfEmployee":"' + obj26 + '","AnnualRevenue":"' + obj27
+ '","AddressTypeId":"' + objadd1 + '","AddressLine1":"' + objadd2
+ '","CityName":"' + objadd4 + '","StateId":"' + objadd6 + '","CountryId":"' + objadd7
+ '","ZipCode":"' + objadd8 + '","DeleveryInstruction":"' + objadd9
+ '","AddressTypeId2":"' + objadd10 + '","AddressLine12":"' + objadd11
+ '","CityId2":"' + objadd13 + '","StateId2":"' + objadd15 + '","CountryId2":"' + objadd16
+ '","ZipCode2":"' + objadd17 + '","DeleveryInstruction2":"' + objadd18
+ '","AddressTypeId3":"' + objadd19 + '","AddressLine13":"' + objadd20
+ '","CityId3":"' + objadd22 + '","StateId3":"' + objadd24 + '","CountryId3":"' + objadd25
+ '","ZipCode3":"' + objadd26 + '","DeleveryInstruction3":"' + objadd27
+ '","AddressTypeId4":"' + objadd28 + '","AddressLine14":"' + objadd29
+ '","CityId4":"' + objadd31 + '","StateId4":"' + objadd33 + '","CountryId4":"' + objadd34
+ '","ZipCode4":"' + objadd35 + '","DeleveryInstruction4":"' + objadd36
+ '","Facebook":"' + obj37
+ '","Twitter":"' + obj38 + '","LinkedIn":"' + obj39 + '","WebSite":"' + obj40 + '"}',
dataType: "json",
error: function () {
// $("#PopSupplier").data("kendoWindow").close();
alert('Data Edited Successfully');
var url = '@Url.Action("ViewLead", "LeadDetails")';
window.location.href = url;
}
});
return;
}
</script>
<script>
function fillText(e) {
debugger;
var state = $(e).is(':checked');
var grid = $('#Empdatagrid').data('kendoGrid');
//var txt = $("#txtAssignedTo").val();
var Count = $('#Empdatagrid').data("kendoGrid").dataSource.total();
for (i = 0; i < Count; i++) {
var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.chkFormols').is(':checked');
if (isChecked == true) {
grid.tbody.find('tr:eq(' + i + ')').attr("class", "k-state-selected");
var isChecked12 = grid.tbody.find('tr:eq(' + i + ')').find('EmployeeProfessionalDtlsId');
// var grid = $('#Empdatagrid').append('getCell', i, 'EmpName');
$('#txtAssignedTo').bind(isChecked12.text);
}
else {
grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
}
}
// $("#popupLeadAssign").hide();
};
//function fillText(e) {
// debugger;
// var state = $(e).is(':checked');
// $('#Empdatagrid').jqGrid({
// onSelectRow: function (id) {
// var amount = $('#Empdatagrid').jqGrid('getCell', id, 'EmpName');
// $('#txtAssignedTo').val(amount);
// },
// });
//}
</script>
<script type="text/javascript">
function fillText1(e) {
debugger;
//if ($(this).is(':checked')) {
$(this).parent().parent().attr("class", "k-state-selected");
var grid2 = $('#Empdatagrid').data('kendoGrid');
var DataItem = grid2.dataItem(grid2.select());
var ID = DataItem.EmpName;
alert(ID);
// }
// else {
// $(this).parent().parent().removeAttr("class", "k-state-selected");
// }
}
</script>
@model CRM.Models.EditLeadModel
<script type="text/javascript">
$(document).ready(function () {
if(document.getElementById('txtAddressLine12').value !='')
{
$("#addbtnDel1").show();
$("#addbtnPlus1").hide();
$("#add_panel2").show();
}
if(document.getElementById('txtAddressLine13').value !='')
{
$("#addbtnDel2").show();
$("#addbtnPlus2").hide();
$("#add_panel3").show();
}
if (document.getElementById('txtAddressLine14').value != '')
{
$("#addbtnDel3").show();
$("#addbtnPlus3").hide();
$("#add_panel4").show();
}
////////////////////////////////////
var Ph = document.getElementById('txthidePhone').value;
var PhType = document.getElementById('txthidePhoneType').value;
var array = Ph.toString().split(',')
var arrayType = PhType.toString().split(',')
var PhoneuniqueId = 0;
for (PhoneuniqueId = 1; PhoneuniqueId < array.length; PhoneuniqueId++) {
//alert(array[i]);
var phon = array[PhoneuniqueId].toString();
var phonType = arrayType[PhoneuniqueId].toString();
$test = $("#div_AddPhone").clone().prependTo(".add_phonepanel");
$test.find("#ddlLeadPhoneType").kendoDropDownList().each(function () {
this.id += PhoneuniqueId
$test.find("#ddlLeadPhoneType" + PhoneuniqueId + "").kendoDropDownList({
Name: ("ddlLeadPhoneType" + PhoneuniqueId + ""),
dataSource: ["Business", "Home", "Mobile", "Other"],
});
this.value = phonType
debugger
var ddl = $("#ddlLeadPhoneType" + PhoneuniqueId + "").data('kendoDropDownList');
//ddl.value = phonType;
ddl.text(phonType);
});
//$test.find("#ddlLeadPhoneType").kendoDropDownList().value(phonType);
$test.find("#div_AddPhonePanel").each(function () { this.id += PhoneuniqueId });
$test.find("#txtConPhone").each(function () { this.id += PhoneuniqueId, this.value = phon });
$test.find("#Phone_Del").css('display', 'inline');
$test.find("#Phone_Del").each(function () { this.id += PhoneuniqueId });
}
//////////////////////////////////////////////////
var Em = document.getElementById('txthideEmail').value;
var EmType = document.getElementById('txthideEmailType').value;
var array1 = Em.toString().split(',')
var array1Type = EmType.toString().split(',')
var j;
for (EmailuniqueId = 1; EmailuniqueId < array1.length; EmailuniqueId++) {
//alert(array1[j]);
var email = array1[EmailuniqueId].toString();
var emailType = array1Type[EmailuniqueId].toString();
$test = $("#div_AddEmail").clone().prependTo(".add_emailpanel");
$test.find("#ddlLeadEmailType").kendoDropDownList().each(function () {
this.id += EmailuniqueId
$test.find("#ddlLeadEmailType" + EmailuniqueId + "").kendoDropDownList({
Name: ("ddlLeadEmailType" + EmailuniqueId + ""),
dataSource: ["Business", "Home", "Mobile", "Other"],
});
var ddl = $("#ddlLeadEmailType" + EmailuniqueId + "").data('kendoDropDownList');
//ddl.value = phonType;
ddl.text(emailType);
});
$test.find("#div_AddEmailPanel").each(function () { this.id += EmailuniqueId });
$test.find("#txtConEmail").each(function () { this.id += EmailuniqueId, this.value = email });
$test.find("#Email_Del").css('display', 'inline');
$test.find("#Email_Del").each(function () { this.id += EmailuniqueId });
}
////////////////////////////////////////////////////////////////
});
</script>
<script>
function SetCheckBOX1(ele) {
debugger;
var state = $(ele).is(':checked');
var grid = $('#Empdatagrid').data('kendoGrid');
var Count = $('#Empdatagrid').data("kendoGrid").dataSource.total();
var cellValue = '';
var cellValueId = '';
for (i = 0; i < Count; i++) {
var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.radio').is(':checked');
if (isChecked == true) {
var rw = grid.tbody.find('tr:eq(' + i + ')');
cellValue += "," + rw.find("td:eq(" + 4 + ")").text();;
cellValueId += "," + rw.find("td:eq(" + 0 + ")").text();;
}
else {
grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
}
}
$("input:checkbox").on('click', function () {
var $box = $(this);
if ($box.is(":checked")) {
var group = "input:checkbox[name='" + $box.attr("name") + "']";
$(group).prop("checked", false);
$box.prop("checked", true);
} else {
$box.prop("checked", false);
}
});
$("#popupLeadAssign").data("kendoWindow").close();
document.getElementById('txtAssignedTo').value = cellValue.substring(1);
document.getElementById('txtAssignedToId').value = cellValueId.substring(1);
document.getElementById('txtAssignedToType').value = 'Employee';
};
</script>
<script>
function SetCheckBOX3(ele) {
debugger;
var state = $(ele).is(':checked');
var grid = $('#Teamdatagrid').data('kendoGrid');
var Count = $('#Teamdatagrid').data("kendoGrid").dataSource.total();
var cellValue = '';
var cellValueId = '';
for (i = 0; i < Count; i++) {
var isChecked = grid.tbody.find('tr:eq(' + i + ')').find('td').find('.radio').is(':checked');
if (isChecked == true) {
var rw = grid.tbody.find('tr:eq(' + i + ')');
cellValue += "," + rw.find("td:eq(" + 3 + ")").text();;
cellValueId += "," + rw.find("td:eq(" + 0 + ")").text();;
}
else {
grid.tbody.find('tr:eq(' + i + ')').removeAttr("class", "k-state-selected");
}
}
$("input:checkbox").on('click', function () {
var $box = $(this);
if ($box.is(":checked")) {
var group = "input:checkbox[name='" + $box.attr("name") + "']";
$(group).prop("checked", false);
$box.prop("checked", true);
} else {
$box.prop("checked", false);
}
});
$("#popupLeadAssign").data("kendoWindow").close();
document.getElementById('txtAssignedTo').value = cellValue.substring(1);
document.getElementById('txtAssignedToId').value = cellValueId.substring(1);
document.getElementById('txtAssignedToType').value = 'Team';
};
</script>
</head>
<body>
<div class="bodee1">
@Html.Partial("_LeadEditRibbonMenu")
</div>
@*@if (TempData["Success"] != null)
{
<p class="alert alert-success" id="successMessage">@TempData["Success"]</p>
}*@
@using (Html.BeginForm("EditLead", "LeadDetails"))
{
<div class="Upper_strip">
<div class="col-md-6">
<div class="Upstrip">
Created By : @Session["GetLoginDetails"]
</div>
<div class="Upstrip">
Created Date : @Session["GetLoginDetailsTime"]
</div>
</div>
<div class="col-md-6">
<div class="Upstrip">
Modified By : NA
@*<input type="hidden" value="@Session["username"]" id="myHiddenVar" />*@
</div>
<div class="Upstrip">
Modified Date :NA
</div>
</div>
</div>
<div id="top_div" style="height:450px; overflow:scroll;">
<ul class="accordion">
<div style="overflow-y:scroll; height:470px">
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Lead Infomation</a>
<ul class="inner1" style="display:inline;">
<li>
<div class="col-md-12">
<div class="col-md-4">
<div class="form-group">
<div class="col-md-4"><label style="color:red">*</label><label>First Name :</label></div>
<div class="col-md-3">
@(Html.Kendo().DropDownListFor(t=> t.Title)
.Name("ddlLeadTitle")
.Filter("startswith")
.BindTo(new List<string>() {
"Mr.",
"Miss.",
"Mrs.",
"Dr.",
"Er.",
"Proff.",
"Advot."
})
.HtmlAttributes(new { style = "width: 100%" }))
</div>
<div class="col-md-5">
@(Html.Kendo().TextBoxFor(t => t.FirstName)
.Name("txtFirstName")
.HtmlAttributes(new { style = "width: 100%", required = "required", placeholder = "First Name", maxlength = "30" }))
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="col-md-4"><label>Middle Name :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.MiddleName)
.Name("txtMiddleName")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Middle Name", maxlength = "50" }))
</div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<div class="col-md-4"><label style="color:red">*</label><label>Last Name :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.LastName)
.Name("txtLastName")
.HtmlAttributes(new { style = "width: 100%", required = "required", placeholder = "Last Name", maxlength = "50" }))
</div>
</div>
</div>
</div>
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Topic :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t=> t.Topic)
.Name("txttopic")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Topic", maxlength = "50" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Lead Status :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.LeadStatus)
.Name("ddlLeadStatus")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("StatusName")
.DataValueField("StatusId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillStatus", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Lead Type :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t => t.LeadTypeId)
.Name("ddlLeadType")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("LeadTypeName")
.DataValueField("LeadTypeId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillLeadType", "LeadDetails");
})
)
<a id="leadTypeAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadtype")
.Title("Create Lead Type")
.Visible(false)
.Modal(true)
.Content
(@<text>
<div class="col-md-12">
<div class="form-group">
<div class="col-md-4"><label>LeadType Name :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t=>t.LeadName)
.Name("txtLeadTypeName")
.HtmlAttributes(new { style = "width: 100%", placeholder = "LeadType Name" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Description :</label></div>
<div class="col-md-8">
@Html.TextArea("Textarea", new { id = "txtLeadTypDesc", style = "height:50px;width:97%;border-color: #cccccc;border-radius:3px " })
</div>
</div>
<div class="clearfix" style="margin-bottom:3%"></div>
<div class="col-md-9" align="right">
<input type="submit" value="Submit" class="btn btn-success" />
</div>
</div>
</text>)
.Draggable()
.Width(350)
.Height(170)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Sales Rep. :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().TextBox()
.Name("txtAssignedTo")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Assign to" }))
<a id="leadAssignSearch" class="k-icon k-i-search" style="padding:0px;"></a>
</span>
@(Html.Kendo().TextBox()
.Name("txtAssignedToId")
.HtmlAttributes(new { style = "display:none" }))
@(Html.Kendo().TextBox()
.Name("txtAssignedToType")
.HtmlAttributes(new { style = "display:none" }))
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadAssign")
.Title("Employee/Team: Search and Select")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Emp_Team_Search")
</text>)
.Draggable()
.Width(1000)
.Height(400)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
@*<div class="form-group">
<div class="col-md-4"><label>Sales Rep. :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().TextBoxFor(t => t.AssignedTo)
.Name("txtAssignedTo")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Assign to" }))
<a id="leadAssignSearch" class="k-icon k-i-search" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadAssign")
.Title("Employee/Team: Search and Select")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Emp_Team_Search")
</text>)
.Draggable()
.Width(1000)
.Height(400)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>*@
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Lead Rating :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.Rating)
.Name("ddlRank")
.Filter("startswith")
.OptionLabel("Select One")
.BindTo(new List<string>() {
"Cold",
"Hot",
"Warm"
})
.HtmlAttributes(new { style = "width: 100%" }))
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Way to Contact :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.BestWayToContact)
.Name("ddlBestwaytoContact")
.Filter("startswith")
.OptionLabel("Select One")
.BindTo(new List<string>() {
"SMS",
"E-Mail",
"Phone"
})
.HtmlAttributes(new { style = "width: 100%" })
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Lead Source :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t => t.SourceId)
.Name("ddlLeadSource")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("SourceName")
.DataValueField("SourceId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillSource", "LeadDetails");
})
)
<a id="leadSouceAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadsource")
.Title("Create Lead Source")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Source")
</text>)
.Draggable()
.Width(1050)
.Height(550)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Job Title :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.JobTitle)
.Name("txtJobTitle")
//.Value(Session["JobTitle"].ToString())
.HtmlAttributes(new { style = "width: 100%", placeholder = "Job Title", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Reffered By :</label></div>
<div class="col-md-8">
<div style="width:39%;float:left;">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t => t.EmployeeId)
.Name("ddlempsel")
.Filter("startswith")
.OptionLabel("Employee")
.DataTextField("EmployeeName")
.DataValueField("EmployeeProfessionalDtlsId")
.HtmlAttributes(new { style = "width: 100%;font-size:12px;" })
.DataSource(ds =>
{
ds.Read("FillEmployee", "LeadDetails");
})
)
<a id="emp_chk" class="k-icon k-i-search" style="padding:0px;"></a>
</span>
</div>
<div style="width:39%;float:left;margin-left:10px;">
<span class=" k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t=> t.Customer)
.Name("ddlCussel")
.Filter("startswith")
.OptionLabel("Customer")
.DataTextField("CustomerName")
.DataValueField("CustomerId")
.HtmlAttributes(new { style = "width: 100%;font-size:12px;" })
.DataSource(ds =>
{
ds.Read("FillCustomer", "LeadDetails");
})
)
<a id="cus_chk" class="k-icon k-i-search" style="padding:0px;"></a>
</span>
</div>
<div style="width:17%;float:right;">
@(Html.Kendo().Button()
.Name("btnother")
.Content("Other")
.HtmlAttributes(new { type = "button", style = "font-size:12px;" })
.Events(e => e.Click("onClickOther"))
)
</div>
</div>
@(Html.Kendo().TextBoxFor(t=> t.Other)
.Name("txtotherRef")
.HtmlAttributes(new { style = "width: 50%; float:right", placeholder = "Other Reference" }))
@(Html.Kendo().TextBoxFor(t => t.ReferredBy)
.Name("txthiderefer")
.HtmlAttributes(new { style = "display:none" }))
@(Html.Kendo().TextBoxFor(t => t.Photo)
.Name("txthidePhoto")
.HtmlAttributes(new { style = "display:none" }))
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Attach Photo :</label></div>
<div class="col-md-8">
<div>
<img id="imageupload" alt="Image" class=" img-rounded" style="float:right;height:100px;width:100px;" />
<div style="float:left; width:50%">
@(Html.Kendo().Upload().Name("LeadImage").Multiple(false)
.Async(a => a
.Save("SaveCompanyPhoto", "LeadDetails").AutoUpload(false))
.Events(e => e.Select("onSelectLogo"))
.HtmlAttributes(new { accept = "image/*", style = "font-size:12px;" })
)
<script>
function onSelectLogo(e) {
debugger
var fileReader = new FileReader();
fileReader.onload = function (event) {
var mapImage = event.target.result;
$("#imageupload").attr('src', mapImage);
}
fileReader.readAsDataURL(e.files[0].rawFile);
}
</script>
</div>
</div>
</div>
</div>
</div>
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="form-group">
<div class="col-md-2"><label>Note :</label></div>
<div class="col-md-10">
@(Html.Kendo().EditorFor(t=> t.Description)
.Name("EditorLeadDescription")
.HtmlAttributes(new { style = "height:10%", placeholder = "Write here somthing..." })
.Resizable(resizable => resizable.Content(true).Toolbar(true))
.ImageBrowser(imageBrowser => imageBrowser
.Image("~/Content/UserFiles/Images/{0}")
.Read("Read", "ImageBrowser")
.Create("Create", "ImageBrowser")
.Destroy("Destroy", "ImageBrowser")
.Upload("Upload", "ImageBrowser")
.Thumbnail("Thumbnail", "ImageBrowser")
))
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Contact Infomation</a>
<ul class="inner1">
<li>
<div class="col-md-12">
<div class="col-md-6">
<div id="div_AddPhone">
<div class="form-group" id="div_AddPhonePanel">
<div class="col-md-4"><label>Phone :</label></div>
<div class="col-md-3">
@(Html.Kendo().DropDownListFor(t=> t.PhoneType)
.Name("ddlLeadPhoneType")
.Filter("startswith")
.BindTo(new List<string>() {
"Business",
"Home",
"Mobile",
"Others"
})
.HtmlAttributes(new { style = "width: 100%" }))
</div>
<div class="col-md-5">
@(Html.Kendo().TextBoxFor(t => t.PhoneNo)
.Name("txtConPhone")
.HtmlAttributes(new { style = "width: 90%", placeholder = "Phone", onkeypress = "return isNumberKey(event)", @maxlength = "10" }))
<span id="Phone_Del" class="glyphicon glyphicon-trash" onclick="Phone_Del_Click(this)" style="display:none;cursor:pointer; "></span>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
</div>
</div>
<p class="add_phonepanel"></p>
<div class="form-group">
<div class="col-md-4"></div>
<div class="col-md-8">
<div class="Mytooltip">
<a class="cornerLink" onclick='AddPhone_onclick()' style="cursor:pointer">Add Phone</a>
<span class="Mytooltiptext">Add Phone</span>
</div>
@(Html.Kendo().TextBoxFor(t => t.PhoneNoA)
.Name("txthidePhone")
.HtmlAttributes(new { style = "display:none"}))
@(Html.Kendo().TextBoxFor(t => t.PhoneTypeA)
.Name("txthidePhoneType")
.HtmlAttributes(new { style = "display:none" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Skype :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.Skype)
.Name("txtSkype")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Skype", maxlength = "30" }))
</div>
</div>
</div>
<div class="col-md-6">
<div id="div_AddEmail">
<div class="form-group" id="div_AddEmailPanel">
<div class="col-md-4"><label>E-Mail :</label></div>
<div class="col-md-3">
@(Html.Kendo().DropDownListFor(t => t.EmailType)
.Name("ddlLeadEmailType")
.Filter("startswith ")
.BindTo(new List<string>() {
"Business",
"Home",
"Others"
})
.HtmlAttributes(new { style = "width: 100%" }))
</div>
<div class="col-md-5">
@(Html.Kendo().TextBoxFor(t => t.EmailId)
.Name("txtConEmail")
.HtmlAttributes(new { style = "width: 90%", placeholder = "E-Mail", type = "email", data_email_msg = "Email format is not valid"}))
<span id="Email_Del" class="glyphicon glyphicon-trash" onclick="Email_Del_Click(this)" style="display:none;cursor:pointer; "></span>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
</div>
</div>
<p class="add_emailpanel"></p>
<div class="form-group">
<div class="col-md-4"></div>
<div class="col-md-8">
<div class="Mytooltip">
<a class="cornerLink" onclick='AddEmail_onclick()' style="cursor:pointer">Add Email</a>
<span class="Mytooltiptext">Add Email</span>
</div>
@(Html.Kendo().TextBoxFor(t => t.EmailIdA)
.Name("txthideEmail")
.HtmlAttributes(new { style = "display:none" }))
@(Html.Kendo().TextBoxFor(t => t.EmailTypeA)
.Name("txthideEmailType")
.HtmlAttributes(new { style = "display:none" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Fax :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.Fax)
.Name("txtFax")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Fax", maxlength = "30", onkeypress = "return isNumberKey(event)" }))
<span id="Email_Del" class="glyphicon glyphicon-trash" style="display:none;cursor:pointer; "></span>
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Additional Infomation</a>
<ul class="inner1">
<li>
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Currency :</label></div>
<div class="col-md-7">
@(Html.Kendo().TextBoxFor(t => t.PotentialAmount)
.Name("txtPotentialAmt")
.HtmlAttributes(new { style = "width: 100%;text-align:right", placeholder = "0.00", maxlength = "30", onkeypress = "return isNumberKey(event)" }))
</div>
<div class="col-md-1">
@(Html.Kendo().TextBox()
.Name("txtCurTyp")
.Enable(false)
.Value("INR")
.HtmlAttributes(new { style = "width: 100%;background-color:lightgray;text-align:center" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Territory :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t=> t.TerritoryId)
.Name("ddlTeritory")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("TerritoryName")
.DataValueField("TerritoryId")
//.AutoBind(false)
.DataSource(ds =>
{
ds.Read("TeritoryBind", "Create");
})
.HtmlAttributes(new { style = "width: 100%" })
)
<a id="LeadTerritoryAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadterritory")
.Title("Create Territory")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Campaign")
</text>)
.Draggable()
.Width(750)
.Height(300)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Estimate Closing Date :</label></div>
<div class="col-md-8">
@(Html.Kendo().DatePickerFor(t => t.EstimatedCloseDate)
.Name("editdtpEstClgDt")
.HtmlAttributes(new { style = "width: 100%", placeholder = "dd/mm/yyyy" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Source Campaign :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t => t.CampaignId)
.Name("ddlCampaign")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("CampaignName")
.DataValueField("CampaignId")
//.AutoBind(false)
.DataSource(ds =>
{
ds.Read("FillCampaign", "LeadDetails");
})
.HtmlAttributes(new { style = "width: 100%" })
)
<a id="LeadcampaignAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadcampaign")
.Title("Create Campaign")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Campaign")
</text>)
.Draggable()
.Width(750)
.Height(300)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Business Infomation</a>
<ul class="inner1">
<li>
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>No of Employee :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.NoOfEmployee)
.Name("txtNoOfEmp")
.HtmlAttributes(new { style = "width: 100%", placeholder = "No of Employee", onkeypress = "return isNumberKey(event)", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Industry :</label></div>
<div class="col-md-8">
<span class="k-textbox k-space-right" style="width:100%">
@(Html.Kendo().DropDownListFor(t => t.IndustryId)
.Name("ddlIndustry")
.Filter("startswith")
.OptionLabel("Select Industry")
.DataTextField("IndustryName")
.DataValueField("IndustryId")
//.AutoBind(false)
.DataSource(ds =>
{
ds.Read("IndustryBind", "Create");
})
.HtmlAttributes(new { style = "width: 100%" })
)
<a id="LeadindustryAdd" class="k-icon k-i-plus" style="padding:0px;"></a>
</span>
</div>
<div style="display:none;">
@(Html.Kendo().Window().Name("popupLeadindustry")
.Title("Create Industry")
.Visible(false)
.Modal(true)
.Content
(@<text>
@Html.Partial("PRV_Campaign")
</text>)
.Draggable()
.Width(750)
.Height(300)
.Actions(actions => actions.Pin().Minimize().Maximize().Close())
.Events(ev => ev.Close("onClose1"))
)
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Company :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.Company)
.Name("txtCompany")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Company", maxlength = "30", required = "required", validationmessage = "Enter Company Name", }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Annual Revenue :</label></div>
<div class="col-md-7">
@(Html.Kendo().TextBoxFor(t => t.AnnualRevenue)
.Name("txtAnnualRev")
.HtmlAttributes(new { style = "width: 100%;text-align:right", placeholder = "0.00",onkeypress = "return isNumberKey(event)", maxlength = "30" }))
</div>
<div class="col-md-1">
@(Html.Kendo().TextBox()
.Name("txtInr")
.Enable(false)
.Value("INR")
.HtmlAttributes(new { style = "width: 100%;background-color:lightgray;text-align:center" }))
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Address Infomation</a>
<ul class="inner1">
<li>
<div class="col-md-12" id="add_panel1">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Type :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t=> t.AddressTypeId)
.Name("ddlAddressType")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("AdressName")
.DataValueField("AddressTypeId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillAddressType", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Country :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.CountryId)
.Name("ddlCountryName")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("CountryName")
.DataValueField("CountryId")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillCountry", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>City :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.CityId)
.Name("txtCity")
.HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
</div>
</div>
<script>
function leadcategoriesChange() {
debugger
var value = this.value(),
ddl = $("#ddlStateName").data("kendoDropDownList");
if (value) {
ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
} else {
ddl.dataSource.filter({});
}
}
function leadcategoriesChange1() {
var value = this.value(),
ddl1 = $("#ddlDistName").data("kendoDropDownList");
if (value) {
ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
} else {
ddl1.dataSource.filter({});
}
}
</script>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Line :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.AddressLine1)
.Name("txtAddressLine1")
.HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "50" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>State :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.StateId)
.Name("ddlStateName")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("StateName")
.DataValueField("StateId")
//.Enable(false)
.CascadeFrom("CountryName")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange1"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillState", "LeadDetails");
//ds.ServerFiltering(true);
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Zipcode :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.ZipCode)
.Name("txtZipCode")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
</div>
</div>
</div>
@*<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="col-md-2"><label>Delivery Instruction :</label></div>
<div class="col-md-10">
@Html.TextArea("Textarea", new { id = "txtDelInstn", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
</div>*@
@*</div>*@
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12" align="right">
<button type="button" class="btn btn-default btn-sm" id="addbtnPlus1">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button type="button" class="btn btn-default btn-sm" id="addbtnDel1">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</div>
<div class="col-md-12" id="add_panel2">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Type :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.AddressTypeId2)
.Name("ddlAddressType2")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("AdressName")
.DataValueField("AddressTypeId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillAddressType", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Country :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.CountryId2)
.Name("ddlCountryName2")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("CountryName")
.DataValueField("CountryId")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillCountry", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>City :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.CityId2)
.Name("txtCity2")
.HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
</div>
</div>
<script>
function leadcategoriesChange() {
debugger
var value = this.value(),
ddl = $("#ddlStateName2").data("kendoDropDownList");
if (value) {
ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
} else {
ddl.dataSource.filter({});
}
}
function leadcategoriesChange1() {
var value = this.value(),
ddl1 = $("#ddlDistName2").data("kendoDropDownList");
if (value) {
ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
} else {
ddl1.dataSource.filter({});
}
}
</script>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Line :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.AddressLine12)
.Name("txtAddressLine12")
.HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>State :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.StateId2)
.Name("ddlStateName2")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("StateName")
.DataValueField("StateId")
//.Enable(false)
.CascadeFrom("CountryName")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange1"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillState", "LeadDetails");
//ds.ServerFiltering(true);
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Zipcode :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.ZipCode2)
.Name("txtZipCode2")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
</div>
</div>
</div>
@*<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="col-md-2"><label>Delivery Instruction :</label></div>
<div class="col-md-10">
@Html.TextArea("Textarea", new { id = "txtDelInstn2", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
</div>
</div>*@
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12" align="right">
<button type="button" class="btn btn-default btn-sm" id="addbtnPlus2">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button type="button" class="btn btn-default btn-sm" id="addbtnDel2">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</div>
<div class="col-md-12" id="add_panel3">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Type :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.AddressTypeId3)
.Name("ddlAddressType3")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("AdressName")
.DataValueField("AddressTypeId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillAddressType", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Country :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.CountryId3)
.Name("ddlCountryName3")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("CountryName")
.DataValueField("CountryId")
// .AutoBind(false)
.Events(e => e.Change("leadcategoriesChange"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillCountry", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>City :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.CityId3)
.Name("txtCity3")
.HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
</div>
</div>
<script>
function leadcategoriesChange() {
debugger
var value = this.value(),
ddl = $("#ddlStateName3").data("kendoDropDownList");
if (value) {
ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
} else {
ddl.dataSource.filter({});
}
}
function leadcategoriesChange1() {
var value = this.value(),
ddl1 = $("#ddlDistName3").data("kendoDropDownList");
if (value) {
ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
} else {
ddl1.dataSource.filter({});
}
}
</script>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Line :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.AddressLine13)
.Name("txtAddressLine13")
.HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "50" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>State :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.StateId3)
.Name("ddlStateName3")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("StateName")
.DataValueField("StateId")
//.Enable(false)
.CascadeFrom("CountryName")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange1"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillState", "LeadDetails");
//ds.ServerFiltering(true);
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Zipcode :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.ZipCode3)
.Name("txtZipCode3")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
</div>
</div>
</div>
@*<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="col-md-2"><label>Delivery Instruction :</label></div>
<div class="col-md-10">
@Html.TextArea("Textarea", new { id = "txtDelInstn3", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
</div>
</div>*@
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12" align="right">
<button type="button" class="btn btn-default btn-sm" id="addbtnPlus3">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button type="button" class="btn btn-default btn-sm" id="addbtnDel3">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</div>
<div class="col-md-12" id="add_panel4">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Type :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.AddressTypeId4)
.Name("ddlAddressType4")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("AdressName")
.DataValueField("AddressTypeId")
//.AutoBind(false)
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillAddressType", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Country :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.CountryId4)
.Name("ddlCountryName4")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("CountryName")
.DataValueField("CountryId")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillCountry", "LeadDetails");
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>City :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.CityId4)
.Name("txtCity4")
.HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "30" }))
</div>
</div>
<script>
function leadcategoriesChange() {
debugger
var value = this.value(),
ddl = $("#ddlStateName4").data("kendoDropDownList");
if (value) {
ddl.dataSource.filter({ field: "CountryId", operator: "eq", value: parseInt(value) });
} else {
ddl.dataSource.filter({});
}
}
function leadcategoriesChange1() {
var value = this.value(),
ddl1 = $("#ddlDistName4").data("kendoDropDownList");
if (value) {
ddl1.dataSource.filter({ field: "StateId", operator: "eq", value: parseInt(value) });
} else {
ddl1.dataSource.filter({});
}
}
</script>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Address Line :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.AddressLine14)
.Name("txtAddressLine14")
.HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>State :</label></div>
<div class="col-md-8">
@(Html.Kendo().DropDownListFor(t => t.StateId4)
.Name("ddlStateName4")
.Filter("startswith")
.OptionLabel("Select One")
.DataTextField("StateName")
.DataValueField("StateId")
//.Enable(false)
.CascadeFrom("CountryName")
//.AutoBind(false)
.Events(e => e.Change("leadcategoriesChange1"))
.HtmlAttributes(new { style = "width: 100%;" })
.DataSource(ds =>
{
ds.Read("FillState", "LeadDetails");
//ds.ServerFiltering(true);
})
)
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Zipcode :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.ZipCode4)
.Name("txtZipCode4")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Zipcode", onkeypress = "return isNumberKey(event)", @maxlength = "6" }))
</div>
</div>
</div>
@*<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12">
<div class="col-md-2"><label>Delivery Instruction :</label></div>
<div class="col-md-10">
@Html.TextArea("Textarea", new { id = "txtDelInstn4", style = "height:80px;width:100%;border-color: #cccccc;border-radius:3px " })
</div>
</div>*@
<div class="clearfix" style="margin-bottom:1%"></div>
<div class="col-md-12" align="right">
<button type="button" class="btn btn-default btn-sm" id="addbtnPlus4">
<span class="glyphicon glyphicon-plus"></span>
</button>
<button type="button" class="btn btn-default btn-sm" id="addbtnDel4">
<span class="glyphicon glyphicon-trash"></span>
</button>
</div>
</div>
</li>
</ul>
</li>
<li>
<a id="top" class="toggle1" href="javascript:void(0);" style="padding-left:20px; ">Social Infomation</a>
<ul class="inner1">
<li>
<div class="col-md-12">
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Facebook :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t=> t.Facebook)
.Name("txtFacebook")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Facebook", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>LinkedIn :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.LinkedIn)
.Name("txtLinkedin")
.HtmlAttributes(new { style = "width: 100%", placeholder = "LinkIn", maxlength = "30" }))
</div>
</div>
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4"><label>Twitter :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.Twitter)
.Name("txtTwitter")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Twitter", maxlength = "30" }))
</div>
</div>
<div class="clearfix" style="margin-bottom:2%"></div>
<div class="form-group">
<div class="col-md-4"><label>Website :</label></div>
<div class="col-md-8">
@(Html.Kendo().TextBoxFor(t => t.WebSite)
.Name("txtWebsite")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Website", maxlength = "30" }))
</div>
</div>
</div>
</div>
</li>
</ul>
</li>
</div>
</ul>
</div>
}
<div class="clearfix" style="margin-bottom:2%"></div>
<script src="~/accordian/js/expandcollapse.js"></script>
</body>
</html>
No comments:
Post a Comment