Skip to content
Loading
  
  •   
  •                 class="form-group">  
  •                     @Html.LabelFor(model => model.PRDate, "Production Date", htmlAttributes: new { @class = "control-label col-md-2" })  
  •                     class="col-md-10">  
  •                         @Html.TextBoxFor(model => model.PRDate, new { id = "datepicker", @class = "form-control" })  
  •                         @*@Html.EditorFor(model => model.PRDate, new { id = "datepicker", htmlAttributes = new { @class = "form-control" } })*@  
  •                         @Html.ValidationMessageFor(model => model.PRDate, "", new { @class = "text-danger" })  
  •                       
  •                   
  •   
  •                 class="form-group">  
  •                     @Html.LabelFor(model => model.PipeID, "Pipe No", htmlAttributes: new { @class = "control-label col-md-2" })  
  •                     class="col-md-10">  
  •                         @Html.DropDownList("PipeID", null, htmlAttributes: new { @class = "form-control" })  
  •                         @Html.ValidationMessageFor(model => model.PipeID, "", new { @class = "text-danger" })  
  •                       
  •                   
  •   
  •                 class="form-group">  
  •                     @Html.LabelFor(model => model.ATTNSYSID, "Operator Name", htmlAttributes: new { @class = "control-label col-md-2" })  
  •                     class="col-md-10">  
  •   
  •                         @Html.DropDownListFor(model => model.ATTNSYSID, new SelectList(""), "--Select Operator--", new { @class = "form-control" })  
  •                           
  •                         @Html.ValidationMessageFor(model => model.ATTNSYSID, "", new { @class = "text-danger" })  
  •                       
  •                   
  •   
  •                 class="form-group">  
  •                     @Html.LabelFor(model => model.Status, "Status", htmlAttributes: new { @class = "control-label col-md-2" })  
  •                     class="col-md-10">  
  •                         @Html.EditorFor(model => model.Status, new { htmlAttributes = new { @class = "form-control" } })  
  •                         @Html.ValidationMessageFor(model => model.Status, "", new { @class = "text-danger" })  
  •                       
  •                   
  •   
  •   
  •                 class="form-group">  
  •                     @Html.LabelFor(model => model.NextStageID, "Next Production Stage", htmlAttributes: new { @class = "control-label col-md-2" })  
  •                     class="col-md-10">  
  •                         @Html.DropDownList("NextStageID", (SelectList)ViewBag.StageID,  htmlAttributes : new { @class = "form-control" } )  
  •                         @Html.ValidationMessageFor(model => model.NextStageID, "", new { @class = "text-danger" })  
  •                       
  •                   
  •                 class="dropdown-menu">  
  •                 class="form-group">  
  •                     class="col-md-offset-2 col-md-10">  
  •                         "submit" value="Create" class="btn btn-default" />  
  •                       
  •                   
  •               
  •         }  
  •   
  •         
      
  •             @Html.ActionLink("Back to List", "Index")  
  •           
  •       
  •   
  •   
  • 0
  • Catcher Wong
    0
    @Raju Fodse
     
    I have tried your code ,  the code runs well for me !! 
     
    If you do not get the result , you need to debug whether the json data is empty or not !
     
    you can add the below code to test or add break points on your GetAttnList method.
    1. $("#PRDate").change(function () {    
    2.  $.get("/Dailyproduction/GetAttnList", 
    3.        { ProductionDate: $("#PRDate").val() }, 
    4.        function (data) {   
    5.            console.log(data); 
    6.            $("#ATTNSYSID").empty();    
    7.            $.each(data, function (index, row) {    
    8.                $("#ATTNSYSID").append(" + row.ATTNSYSID + "'>" + row.EmpName + "")    
    9.            });        
    10.        });    
    11.  });    
    0