Wednesday, 26 July 2017

MVC Kendo

Create View


@using Kendo.Mvc.UI
@model CRM.Models.MasterModel
@{
    ViewBag.Title = "CreateLead";
    Layout = "~/Views/Shared/_FinalMasterLayout.cshtml";
}
<!DOCTYPE html>
<html>
<head>
    <meta name="viewport" content="width=device-width" />
        <title></title>
    <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>
    $(window).load(function () {
        var dropDown = $("#ddlempsel").data("kendoDropDownList");
        dropDown.enable(false);
        var dropDown1 = $("#ddlCussel").data("kendoDropDownList");
        dropDown1.enable(false);

        $("#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>
            $(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 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>

    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>

    @*------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 {
     
        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>
    <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>

    @*------Ribbon Save-----*@
    <script>
        function savebtn(e) {
         
            var validator = $("#top_div").kendoValidator().data("kendoValidator");
            if (validator.validate()) {

            } else {
                return false;
            }
            //---T_crm_Lead---\\
            debugger
            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 = $("#txtAssignedToId").val();
            var obj9Type = $("#txtAssignedToType").val();
            var obj10 = $("#EditorLeadDescription").val();
            var empid;
            var cusid;
            var othertxt;
            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 = $("#txtConPhone").val();
            var obj13 = $("#ddlLeadEmailType").val();
            var obj14 = $("#txtConEmail").val();
            var obj15 = $("#txtSkype").val();
            var obj16 = $("#txtFax").val();

            //---T_crm_LeadAdditionalInformation---\\
            var obj17 = $("#txtPotentialAmt").val();
            //var obj18 = $("#txtCurTyp").val();
            var obj19 = $("#dtpEstClgDt").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 objadd4 = $("#txtCity").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 objadd13 = $("#txtCity2").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 objadd22 = $("#txtCity3").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 objadd31 = $("#txtCity4").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/CreateLead',
                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 + '","SalesRepEmployeeId":"' + obj9
                    + '","SalesRepType":"' + obj9Type
                    + '","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

                   + '","AddressTypeId2":"' + objadd10 + '","AddressLine12":"' + objadd11
                    + '","CityId2":"' + objadd13 + '","StateId2":"' + objadd15 + '","CountryId2":"' + objadd16
                    + '","ZipCode2":"' + objadd17

                   + '","AddressTypeId3":"' + objadd19 + '","AddressLine13":"' + objadd20
                    + '","CityId3":"' + objadd22 + '","StateId3":"' + objadd24 + '","CountryId3":"' + objadd25
                    + '","ZipCode3":"' + objadd26

                    + '","AddressTypeId4":"' + objadd28 + '","AddressLine14":"' + objadd29
                    + '","CityId4":"' + objadd31 + '","StateId4":"' + objadd33 + '","CountryId4":"' + objadd34
                    + '","ZipCode4":"' + objadd35

                    + '","Facebook":"' + obj37
                    + '","Twitter":"' + obj38 + '","LinkedIn":"' + obj39 + '","WebSite":"' + obj40 + '"}',
                dataType: "json",
                error: function () {
                    // $("#PopSupplier").data("kendoWindow").close();
                    alert('Data Save Successfully');
                    var url = '@Url.Action("ViewLead", "LeadDetails")';
                    window.location.href = url;
                }
            });
            return;
        }
    </script>
 

</head>

<body>

    <div class="bodee1">
        @Html.Partial("_LeadRibbonMenu")
    </div>
    @*@if (TempData["Success"] != null)
        {
            <p class="alert alert-success" id="successMessage">@TempData["Success"]</p>
        }*@
    @using (Html.BeginForm())
    {

        <div class="Upper_strip">
            <div class="col-md-6">
                <div class="Upstrip">
                    Created By :&nbsp;&nbsp; @Session["GetLoginDetails"] &nbsp;&nbsp;
                </div>
                <div class="Upstrip">
                    Created Date :&nbsp;&nbsp;@Session["GetLoginDetailsTime"]
                </div>
            </div>
            <div class="col-md-6">
                <div class="Upstrip">
                    Modified By :&nbsp;&nbsp;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">

                <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-6">
                                    <div class="form-group">
                                        <div class="col-md-2"><label style="color:red">*</label><label>Salutation :</label></div>
                                        <div class="col-md-2">
                                            @(Html.Kendo().DropDownList()
                                                .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-8">
                                            <div class="col-md-4"><label>First Name :</label></div>
                                            @(Html.Kendo().TextBox()
                                                .Name("txtFirstName")

.HtmlAttributes(new { style = "width: 66%", placeholder = "First Name", required = "required", validationmessage = "Enter First Name", maxlength = "50" }))
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-3">
                                    <div class="form-group">
                                        <div class="col-md-4" style="width:40%"><label>Middle Name :</label></div>
                                        <div class="col-md-7">
                                            @(Html.Kendo().TextBox()
                                                .Name("txtMiddleName")
                .HtmlAttributes(new { style = "width: 90%", placeholder = "Middle Name", maxlength = "50" }))
                                        </div>
                                    </div>
                                </div>
                                <div class="col-md-3">
                                    <div class="form-group">
                                        <div class="col-md-4" style="width:40%"><label style="color:red">*</label><label>Last Name :</label></div>
                                        <div class="col-md-7">
                                            @(Html.Kendo().TextBox()
                                                .Name("txtLastName")
.HtmlAttributes(new { style = "width: 100%", required = "required", placeholder = "Last Name", validationmessage = "Enter 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().TextBox()
                                                .Name("txttopic")

                .HtmlAttributes(new { style = "width: 100%", placeholder = "Topic", maxlength = "20" }))
                                        </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().DropDownList()
                                                .Name("ddlLeadStatus")
                                                .Filter("startswith")
                                               
                                                .OptionLabel("New")
                                                .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().DropDownList()
                                                    .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 LeadType")
                                        .Visible(false)
                                        .Modal(true)
                                        .Content
                                            (@<text>
                                            @Html.Partial("PRV_LeadType")
                                            </text>)
                                                                                            .Draggable()
                                                                                            .Width(750)
                                                                                            .Height(300)
                                                                                            .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="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().DropDownList()
                                                .Name("ddlRank")
                                                .Filter("startswith")
                                               // .OptionLabel("Cold")
                                             
                                             
                                                .BindTo(new List<string>() {
                                                "Cold",
                                                "Hot",
                                                "Warm"
                                           
                                                })

        .HtmlAttributes(new { style = "width: 100%" }))
                                        </div>
                                    </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().DropDownList()
                                                .Name("ddlBestwaytoContact")
                                                .Filter("startswith")
                                                .BindTo(new List<string>() {
                                                     "Select One",
                                                "SMS",
                                                "E-Mail",
                                                "Phone"


                                                })
                                                @*@(Html.Kendo().DropDownList()
                                                    .Name("ddlBestwaytoContact")
                                                    .Filter("startswith")
                                                    .OptionLabel("Select One")
                                                    .DataTextField("Text")
                                                    .DataValueField("Value")
                                                    .BindTo(new List<string>() {
                                                    "SMS",
                                                    "E-Mail",
                                                    "Telephone"
                                                    })*@
.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 style="color:red">*</label><label>Lead Source :</label></div>
                <div class="col-md-8">
                    <span class="k-textbox k-space-right" style="width:100%">
                        @(Html.Kendo().DropDownList()
                                                    .Name("ddlLeadSource")
                                                    .Filter("startswith")
                                                    .OptionLabel("Select One")
                                                    .DataTextField("SourceName")
                                                    .DataValueField("SourceId")
                                                    .AutoBind(false)
                                                 
                                                    .DataSource(ds =>
                                                    {
                                                        ds.Read("FillSource", "LeadDetails");
                                                    })
                            .HtmlAttributes(new { style = "width: 100%", required = "required", validationmessage = "Select Source Name" })
                        )
                        <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().TextBox()
                                                .Name("txtJobTitle")
            //.Value(Session["JobTitle"].ToString())

                                        .HtmlAttributes(new { style = "width: 100%", placeholder = "Job Title", maxlength = "20" }))
                </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().DropDownList()
                                                        .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().DropDownList()
                                                        .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().TextBox()
                                            .Name("txtotherRef")
                                            .HtmlAttributes(new { style = "width: 50%; float:right", placeholder = "" }))
            </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().Editor()
                                                .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 style="color:red">*</label><label>Phone :</label></div>
                                    <div class="col-md-3">
                                        @(Html.Kendo().DropDownList()
                                            .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().TextBox()
                                            .Name("txtConPhone")
.HtmlAttributes(new { style = "width: 90%", placeholder = "Phone", required = "required", validationmessage = "Enter Your Phone no.", onkeypress = "return isNumberKey(event)", maxlength = "10" }))
                                        @*@Html.ValidationMessage()*@
                                        <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">&nbsp;</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>
                                </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().TextBox()
                                            .Name("txtSkype")
                    .HtmlAttributes(new { style = "width: 100%", placeholder = "Skype", maxlength = "30" }))
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="clearfix" style="margin-bottom:2%"></div>
                            <div id="div_AddEmail">
                                <div class="form-group" id="div_AddEmailPanel">

                                    <div class="col-md-4"><label style="color:red">*</label><label>E-Mail :</label></div>
                                    <div class="col-md-3">
                                        @(Html.Kendo().DropDownList()
                                            .Name("ddlLeadEmailType")
                                            .Filter("startswith ")
                                            .BindTo(new List<string>() {
                                                  "Business",
                                                  "Home",
                                                  "Others"
                                              })
                                            .HtmlAttributes(new { style = "width: 100%" }))
                                    </div>
                                    <div class="col-md-5">
                                        @(Html.Kendo().TextBox()
                                            .Name("txtConEmail")
.HtmlAttributes(new { style = "width: 90%", placeholder = "E-Mail", required = "required", validationmessage = "Enter Your Email-Id", 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">&nbsp;</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>
                                </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().TextBox()
                                            .Name("txtFax")
                    .HtmlAttributes(new { style = "width: 100%", placeholder = "Fax", maxlength = "20",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().TextBox()
                                          .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().DropDownList()
                                                .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_Teritory")
                                            </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().DatePicker()
                                          .Name("dtpEstClgDt")
                                          .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().DropDownList()
                                                .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 class="clearfix" style="margin-bottom:2%"></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().TextBox()
                                          .Name("txtNoOfEmp")
.HtmlAttributes(new { style = "width: 100%", placeholder = "No of Employee", maxlength = "30", onkeypress = "return isNumberKey(event)" }))
                                </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().DropDownList()
                                            .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_Industry")
                                            </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><label style="color:red">*</label>Company :</label></div>
                                <div class="col-md-8">
                                    @(Html.Kendo().TextBox()
                                          .Name("txtCompany")
                  .HtmlAttributes(new { style = "width: 100%", placeholder = "Company", required = "required", validationmessage = "Enter Company Name", maxlength = "30" }))
                                </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().TextBox()
                                          .Name("txtAnnualRev")
.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("txtInr")
                                         .Enable(false)
                                         .Value("INR")
                                         .HtmlAttributes(new { style = "width: 100%;background-color:lightgray;text-align:center" }))
                                </div>
                            </div>
                        </div>
                        <div class="clearfix" style="margin-bottom:2%"></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().DropDownList()
                                                .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().DropDownList()
                                        .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().TextBox()
                                                  .Name("txtCity")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "50" }))
                                </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().TextBox()
                                                  .Name("txtAddressLine1")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "80" }))
                                </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().DropDownList()
                                        .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().TextBox()
                                     .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().DropDownList()
                                                .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().DropDownList()
                                        .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().TextBox()
                                                  .Name("txtCity2")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "50" }))
                                </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().TextBox()
                                                  .Name("txtAddressLine12")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "80" }))
                                </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().DropDownList()
                                        .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().TextBox()
                                                  .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().DropDownList()
                                                .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().DropDownList()
                                        .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().TextBox()
                                                  .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().TextBox()
                                                  .Name("txtAddressLine13")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "80" }))
                                </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().DropDownList()
                                        .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().TextBox()
                                                  .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().DropDownList()
                                                .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().DropDownList()
                                        .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().TextBox()
                                                  .Name("txtCity4")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "City", maxlength = "50" }))
                                </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().TextBox()
                                                  .Name("txtAddressLine14")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "AddressLine", maxlength = "80" }))
                                </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().DropDownList()
                                        .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().TextBox()
                                                  .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().TextBox()
                                                  .Name("txtFacebook")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "Facebook", maxlength = "50" }))
                                </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().TextBox()
                                                   .Name("txtLinkedin")
                           .HtmlAttributes(new { style = "width: 100%", placeholder = "LinkIn", maxlength = "50" }))
                                </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().TextBox()
                                                  .Name("txtTwitter")
                          .HtmlAttributes(new { style = "width: 100%", placeholder = "Twitter", maxlength = "50" }))
                                </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().TextBox()
                                                  .Name("txtWebsite")
.HtmlAttributes(new { style = "width: 100%", placeholder = "Website", maxlength = "50" }))
                                </div>
                            </div>
                        </div>
                    </div>
                </li>
            </ul>
        </li>

        </ul>
    </div>
    }

    <script>
        $(document).ready(function () {
            var validator = $("#top_div").kendoValidator().data("kendoValidator");

        });
    </script>
    <div class="clearfix" style="margin-bottom:2%"></div>

    <script src="~/accordian/js/expandcollapse.js"></script>

</body>

</html>

No comments:

Post a Comment