0
내가 각도 JS MVC 여기에 데이터를 드롭 다운리스트에 구속력을 사용하고
에 바인딩하지하지만 데이터베이스에 값을로드하려고하지만 때 데이터 binfing하지 :왜 드롭 다운리스트 값은 데이터베이스
<div class="form-group">
<div class="row">
<div class="col-md-2 col-sm-2" style="margin-left:20px">
<b>State</b>
</div>
<div class="col-md-8 col-sm-8">
<select class="form-control" data-modal="modal" ng-options="I.CountryID as I.CountryName for I in CountryList" ng-model="CountryID" ng-change="StateList()" ng-required="true">
<option value="" disabled selected>--Select Country--</option>
</div>
</div>
</div>
각 코드를
$scope.AddUpdateEmployee = function (Emp) {
alert("Enter in update")
var Employee = {
Id: $scope.EmployeeId,
Name: $scope.EmployeeName,
Email: $scope.EmployeeEmail,
Psw: $scope.Password,
Country: $scope.CountryID,
};
MVC 코드
public JsonResult AddEmployee(Employee emps)
{
if (emps != null)
{
Employee ee = new Employee();
ee.Name = emps.Name;
ee.Email = emps.Email;
ee.Psw = emps.Psw;
ee.Country = emps.Country;
ee.State = emps.State;
ee.City = emps.City;
}
당신이 데이터를 게시하려고 할 때를 수행 데이터 베이스? 전체 코드를 볼 수 있습니까, 지금 당신은 조각을 공유하고 있습니다, 나는 html을 볼 필요가 있습니다 어디 직원을 구속하고 있습니까? –