<ajaxpro.ajaxmethod()>
function OnEmployeeChange(EmployeeList) { var empCode = EmployeeList.options[EmployeeList.selectedIndex].value EskanRyteHRMS.Personal_Transfer.SetEmployeeProperties(empCode, OnEmployeeChange_callback) // Personal_Transfer.SetEmployeeProperties(empCode, OnEmployeeChange_callback) } function OnEmployeeChange_callback(response) { if (response != null) { var DataRow = response.value; var dlOldLocation = document.getElementById("<%=dlOldLocation.ClientID%>"); var dlLocation = document.getElementById("<%=dlLocation.ClientID%>"); dlOldLocation.value = dlLocation.value = DataRow[4]; var dlOldDepartment = document.getElementById("<%=dlOldDepartment.ClientID%>"); var dlDepartment = document.getElementById("<%=dlDepartment.ClientID%>"); dlDepartment.value = dlOldDepartment.value = DataRow[3]; var dlOldReportTo = document.getElementById("<%=dlOldReportTo.ClientID%>"); var dlReportTo = document.getElementById("<%=dlReportTo.ClientID%>"); dlOldReportTo.value = dlReportTo.value = DataRow[2]; var dlOldDivision = document.getElementById("<%=dlOldDivision.ClientID%>"); var dlDivision = document.getElementById("<%=dlDivision.ClientID%>"); dlOldDivision.value = dlDivision.value = DataRow[1]; var dlOldDesignation = document.getElementById("<%=dlOldDesignation.ClientID%>"); var dlDesignation = document.getElementById("<%=dlDesignation.ClientID%>"); dlOldDesignation.value = dlDesignation.value = DataRow[0]; } }
<ajaxpro.ajaxmethod()> Public Function SetEmployeeProperties(ByVal EmployeeCode As String) As System.Data.DataRow Dim result As Data.DataRow = Nothing Dim dtTable As Data.DataTable = New DataAccessLayer.DataConnection(GB.PropertyManager(Session).ActiveConnectionString).ExecuteToDataSet("select DesigCode,DivCode,ReportTo,DeptCode,LocationID,JobGrade,Rank from employee_mst Where EmpCode = " + EmployeeCode).Tables(0) If (dtTable.Rows.Count > 0) Then result = dtTable.Rows(0) End If Return result End Function
AjaxPro
[WebMethod]
[ScriptMethod]
ExecuteToDataSet
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)