← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2137: Work in Progress for Bangladesh manpower Module

 

------------------------------------------------------------
revno: 2137
committer: Neeraj <neeraj.hisp@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2010-11-22 17:07:31 +0530
message:
  Work in Progress for Bangladesh manpower Module
modified:
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/RemoveEmployeeAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/NextPeriodsAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowUpdateEmployeePostFormAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/UpdateEmployeePostAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeeList.vm
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm
  local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/employee.js
  local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/RemoveEmployeeAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/RemoveEmployeeAction.java	2010-10-28 11:40:15 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/employee/RemoveEmployeeAction.java	2010-11-22 11:37:31 +0000
@@ -7,67 +7,67 @@
 
 import com.opensymphony.xwork2.Action;
 
-public class RemoveEmployeeAction 
-implements Action 
+public class RemoveEmployeeAction
+    implements Action
 {
-	// -------------------------------------------------------------------------
+    // -------------------------------------------------------------------------
     // Dependencies
     // -------------------------------------------------------------------------
-	
-	private EmployeeService employeeService;
-	
-	public void setEmployeeService(EmployeeService employeeService) 
-	{
-		this.employeeService = employeeService;
-	}
-	
+
+    private EmployeeService employeeService;
+
+    public void setEmployeeService( EmployeeService employeeService )
+    {
+        this.employeeService = employeeService;
+    }
+
     // -------------------------------------------------------------------------
     // Input/Output
     // -------------------------------------------------------------------------
 
     private String id;
 
-	public void setId(String id)
-	{
-		this.id = id;
-	}
+    public void setId( String id )
+    {
+        this.id = id;
+    }
 
-	private String message;
+    private String message;
 
     public String getMessage()
     {
         return message;
     }
-    
+
     private I18n i18n;
 
     public void setI18n( I18n i18n )
     {
         this.i18n = i18n;
     }
+
     // -------------------------------------------------------------------------
     // Action implementation
     // -------------------------------------------------------------------------
 
+    public String execute()
+    {
+        Employee employee = employeeService.getEmployeeByPDSCode( id );
 
-	public String execute()
-	{
-		Employee employee = employeeService.getEmployeeByPDSCode( id );
-	
-		try
-		{
-			employeeService.deleteEmployee( employee );
-		}
-		catch( DeleteNotAllowedException ex )
-		{
-			if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
+        try
+        {
+            employeeService.deleteEmployee( employee );
+        }
+        catch ( DeleteNotAllowedException ex )
+        {
+            if ( ex.getErrorCode().equals( DeleteNotAllowedException.ERROR_ASSOCIATED_BY_OTHER_OBJECTS ) )
             {
                 message = i18n.getString( "object_not_deleted_associated_by_objects" ) + " " + ex.getClassName();
-                
+
                 return ERROR;
             }
-		}
-		return SUCCESS;
-	}
+        }
+        return SUCCESS;
+    }
 
 }

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java	2010-11-19 12:52:40 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/GetValidatePostVacantAction.java	2010-11-22 11:37:31 +0000
@@ -11,14 +11,11 @@
 import org.hisp.dhis.datavalue.DataValue;
 import org.hisp.dhis.datavalue.DataValueService;
 import org.hisp.dhis.dbmanager.DataBaseManagerInterface;
-import org.hisp.dhis.i18n.I18nFormat;
 import org.hisp.dhis.linelisting.LineListGroup;
 import org.hisp.dhis.linelisting.LineListOption;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
-import org.hisp.dhis.period.DailyPeriodType;
 import org.hisp.dhis.period.Period;
 import org.hisp.dhis.period.PeriodService;
-import org.hisp.dhis.period.PeriodType;
 import org.hisp.dhis.user.CurrentUserService;
 
 import com.opensymphony.xwork2.Action;
@@ -26,9 +23,9 @@
 public class GetValidatePostVacantAction
     implements Action
 {
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
     // Dependency
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
 
     private SelectedStateManager selectedStateManager;
 
@@ -71,7 +68,7 @@
     {
         this.optionComboService = optionComboService;
     }
-    
+
     private PeriodService periodService;
 
     public void setPeriodService( PeriodService periodService )
@@ -79,23 +76,16 @@
         this.periodService = periodService;
     }
 
-    private I18nFormat format;
-
-    public void setFormat( I18nFormat format )
-    {
-        this.format = format;
-    }
-
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
     // Input/Output
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
     private String dataValue;
-    
+
     public void setDataValue( String dataValue )
     {
         this.dataValue = dataValue;
     }
-    
+
     private String dataValueMapKey;
 
     public void setDataValueMapKey( String dataValueMapKey )
@@ -109,7 +99,7 @@
     {
         return message;
     }
-    
+
     public String reportingDate;
 
     public void setReportingDate( String reportingDate )
@@ -118,45 +108,47 @@
     }
 
     private String storedBy;
-    
+
     private LineListGroup lineListGroup;
 
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
     // Action Implementation
-    // --------------------------------------------------------------------------
+    //--------------------------------------------------------------------------
 
     public String execute()
     {
         OrganisationUnit organisationunit = selectedStateManager.getSelectedOrganisationUnit();
-        
+
         lineListGroup = selectedStateManager.getSelectedLineListGroup();
-        
+
         LineListOption lineListOption = selectedStateManager.getSelectedLineListOption();
-        
+
         String postLineListElementName = lineListGroup.getLineListElements().iterator().next().getShortName();
-        String lastWorkingDateLLElementName  = "lastworkingdate";
+        String lastWorkingDateLLElementName = "lastworkingdate";
         String departmentLineListName = lineListGroup.getName();
-        
+
         // preparing map to filter records from linelist table
         Map<String, String> llElementValueMap = new HashMap<String, String>();
         llElementValueMap.put( postLineListElementName, lineListOption.getName() );
         llElementValueMap.put( lastWorkingDateLLElementName, "null" );
 
-        int recordNo = dataBaseManagerInterface.getLLValueCountByLLElements( departmentLineListName, llElementValueMap, organisationunit );
-        System.out .println("The Entered Value is: " + dataValue + "Column name is: " + postLineListElementName );
-        
+        int recordNo = dataBaseManagerInterface.getLLValueCountByLLElements( departmentLineListName, llElementValueMap,
+            organisationunit );
+        System.out.println( "The Entered Value is: " + dataValue + "Column name is: " + postLineListElementName );
+
         int input = Integer.parseInt( dataValue );
 
-        if( input > recordNo )
+        if ( input > recordNo )
         {
-            message = "Number of Sanctioned Position is " + input + " And Number of Filled Position is " + recordNo + "\nDo you want to Add ?";
+            message = "Number of Sanctioned Position is " + input + " And Number of Filled Position is " + recordNo
+                + "\nDo you want to Add ?";
             saveDataValue();
             return SUCCESS;
         }
         else
         {
             message = "Number of Filled Position is equal to Number Sanctioned Post";
-            
+
             return INPUT;
         }
     }
@@ -165,7 +157,6 @@
     {
         OrganisationUnit organisationunit = selectedStateManager.getSelectedOrganisationUnit();
 
-        //Period historyPeriod = getHistoryPeriod();
         Period period = periodService.getPeriod( 0 );
 
         storedBy = currentUserService.getCurrentUsername();
@@ -179,7 +170,7 @@
         DataElement dataElement = dataElementService.getDataElement( dataElementId );
 
         DataElementCategoryOptionCombo optionCombo = optionComboService
-        .getDataElementCategoryOptionCombo( optionComboId );
+            .getDataElementCategoryOptionCombo( optionComboId );
 
         if ( dataValue != null && dataValue.trim().length() == 0 )
         {
@@ -201,8 +192,8 @@
         {
             if ( dataValue != null )
             {
-                dataValueObj = new DataValue( dataElement, period, organisationunit, dataValue, storedBy, new Date(), null,
-                    optionCombo );
+                dataValueObj = new DataValue( dataElement, period, organisationunit, dataValue, storedBy, new Date(),
+                    null, optionCombo );
                 dataValueService.addDataValue( dataValueObj );
             }
         }
@@ -216,58 +207,4 @@
         }
     }
 
-    private Period getHistoryPeriod( )
-    {
-        //lineListGroup = selectedStateManager.getSelectedLineListGroup();
-        Date historyDate = format.parseDate( reportingDate );
-        System.out.println("Report Date is :::::::" + reportingDate );
-        
-        Period period;
-        period = periodService.getPeriod( 0 );
-        Period historyPeriod;
-        
-
-        if ( lineListGroup != null && lineListGroup.getPeriodType().getName().equalsIgnoreCase( "OnChange" ) )
-        {
-            PeriodType dailyPeriodType = new DailyPeriodType();
-            historyPeriod = dailyPeriodType.createPeriod( historyDate );
-            
-            System.out.println( reportingDate + " : " + historyPeriod );
-            if ( historyPeriod == null )
-            {
-                System.out.println( "historyPeriod is null" );
-            }
-            historyPeriod = reloadPeriodForceAdd( historyPeriod );
-        }
-        else
-        {
-            period = selectedStateManager.getSelectedPeriod();
-
-            period = reloadPeriodForceAdd( period );
-
-            historyPeriod = period;
-        }
-        
-        return historyPeriod;
-    }
-    
-    private final Period reloadPeriod( Period period )
-    {
-        return periodService.getPeriod( period.getStartDate(), period.getEndDate(), period.getPeriodType() );
-    }
-
-    private final Period reloadPeriodForceAdd( Period period )
-    {
-        Period storedPeriod = reloadPeriod( period );
-
-        if ( storedPeriod == null )
-        {
-            periodService.addPeriod( period );
-
-            return period;
-        }
-
-        return storedPeriod;
-    }
-
 }

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/NextPeriodsAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/NextPeriodsAction.java	2010-10-20 06:14:25 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/NextPeriodsAction.java	2010-11-22 11:37:31 +0000
@@ -27,8 +27,6 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-
-
 import com.opensymphony.xwork2.Action;
 
 public class NextPeriodsAction

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java	2010-11-20 12:16:50 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SaveEmplyeePostAction.java	2010-11-22 11:37:31 +0000
@@ -30,10 +30,8 @@
 {
 
     //--------------------------------------------------------------------------
-    // -
     // Dependencies
     //--------------------------------------------------------------------------
-    // -
 
     private LineListService lineListService;
 
@@ -85,10 +83,9 @@
     }
 
     //--------------------------------------------------------------------------
-    // -
     // Input/Output
     //--------------------------------------------------------------------------
-    // -
+
     private String department;
 
     public void setDepartment( String department )
@@ -163,8 +160,6 @@
     {
         HttpServletRequest request = ServletActionContext.getRequest();
 
-        System.out.println( "GroupId id :::::" + groupid );
-
         Collection<LineListElement> linelistElements = lineListService.getLineListGroup( groupid )
             .getLineListElements();
 
@@ -187,15 +182,11 @@
             String linelistElementValue = request.getParameter( linelistElement.getShortName() );
 
             // Hardcoding to get PDSCode of Employee
-
             if ( i == 0 )
             {
                 pdsCode = linelistElementValue;
             }
 
-            System.out.println( "Linelist Element name is :" + linelistElement.getShortName()
-                + " And Linlelist Value is:" + linelistElementValue );
-
             if ( linelistElementValue == null )
             {
                 continue;
@@ -205,6 +196,7 @@
             {
                 linelistElementValue = "";
             }
+
             llElementValuesMap.put( linelistElement.getShortName(), linelistElementValue );
             i++;
         }
@@ -299,5 +291,4 @@
 
         return storedPeriod;
     }
-
 }

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java	2010-11-17 10:49:09 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/SelectAction.java	2010-11-22 11:37:31 +0000
@@ -278,17 +278,11 @@
 
             return SUCCESS;
         }
-        
 
-        // ---------------------------------------------------------------------
         // Load Options for First LineListElement in the Group
-        // ---------------------------------------------------------------------
         lineListOptions = new ArrayList<LineListOption>( selectedLineListGroup.getLineListElements().iterator().next().getLineListElementOptions() );
 
-        // ---------------------------------------------------------------------
         // Validate selected LineListOption
-        // ---------------------------------------------------------------------
-
         if ( selectedLineListOptionId != null && !selectedLineListOptionId.equalsIgnoreCase( "null" ) )
         {
             selectedLineListOption = lineListService.getLineListOptionByName( selectedLineListOptionId );
@@ -314,10 +308,7 @@
             return SUCCESS;
         }
 
-        // ---------------------------------------------------------------------
         // Prepare for multidimensional dataentry
-        // ---------------------------------------------------------------------
-
         int numberOfTotalColumns = 1;
 
         if ( selectedLineListGroup.getLineListElements().size() > 0 )
@@ -331,10 +322,7 @@
             }
         }
 
-        // ---------------------------------------------------------------------
         // Generate Periods
-        // ---------------------------------------------------------------------
-
         if ( selectedLineListGroup != null
             && selectedLineListGroup.getPeriodType().getName().equalsIgnoreCase( "OnChange" ) )
         {
@@ -350,10 +338,7 @@
             periods = selectedStateManager.getPeriodList();
         }
 
-        // ---------------------------------------------------------------------
         // Validate selected Period
-        // ---------------------------------------------------------------------
-
         if ( selectedPeriodIndex == null )
         {
             selectedPeriodIndex = selectedStateManager.getSelectedPeriodIndex();

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java	2010-11-19 12:52:40 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowEmployeePostFormAction.java	2010-11-22 11:37:31 +0000
@@ -135,10 +135,8 @@
         lineListElements.remove( 0 );
         
         // Hardcoding to remove lastWorkingDate and reasonWhyLeft
-        
-        lineListElements.remove( lineListElements.size()-1 );
-        lineListElements.remove( lineListElements.size()-1 );
-        
+        lineListElements.remove( lineListElements.size()-1 );
+        lineListElements.remove( lineListElements.size()-1 );
         
         linelistGroupName = selectedStateManager.getSelectedLineListGroup().getName();
         linelistOptionName = selectedStateManager.getSelectedLineListOption().getName();

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowUpdateEmployeePostFormAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowUpdateEmployeePostFormAction.java	2010-11-19 12:52:40 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ShowUpdateEmployeePostFormAction.java	2010-11-22 11:37:31 +0000
@@ -92,14 +92,12 @@
         return linelistGroupId;
     }
 
-
     //--------------------------------------------------------------------------
     // Action Implementation
     //--------------------------------------------------------------------------
   
     public String execute()
     {
-        System.out.println("Inside UPDATE EMPLOYEE POST FORM:::::::");
         OrganisationUnit orgUnit = selectedStateManager.getSelectedOrganisationUnit();
         LineListGroup llGroup = selectedStateManager.getSelectedLineListGroup();
         lineListElements = new ArrayList<LineListElement>( llGroup.getLineListElements() );
@@ -108,13 +106,12 @@
         
         Map<String, String> llDataValueMap = new HashMap<String, String>();
         
-        // HardCoding Columan name
+        // HardCoding Column name
         String pdsCodeColName = "pdscode";
         String lastWorkingDateColumnName  = "lastworkingdate";
         
         llDataValueMap.put( pdsCodeColName, id );
         llDataValueMap.put( lastWorkingDateColumnName, "null" );
-        System.out.println("The entered PDSCODE IS ***************" + id );
         
         llDataValuesList = dataBaseManagerInterface.getLLValuesFilterByLLElements( llGroup.getShortName(), llDataValueMap, orgUnit );
         
@@ -126,13 +123,11 @@
             llDataValue = llDataValuesList.get( 0 );
             llDataValuesMap = llDataValue.getLineListValues();
         }
-        System.out.println("::::::::::::" + llDataValuesMap );
         
         linelistGroupName = selectedStateManager.getSelectedLineListGroup().getName();
         linelistOptionName = selectedStateManager.getSelectedLineListOption().getName();
         linelistGroupId = selectedStateManager.getSelectedLineListGroup().getId();
         
-        
         return SUCCESS;
     }
 

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/UpdateEmployeePostAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/UpdateEmployeePostAction.java	2010-11-20 12:16:50 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/UpdateEmployeePostAction.java	2010-11-22 11:37:31 +0000
@@ -1,6 +1,5 @@
 package org.hisp.dhis.ll.action.lldataentry;
 
-import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashMap;
@@ -149,14 +148,16 @@
         Period historyPeriod = getHistoryPeriod();
 
         Map<String, String> llElementValuesMap = new HashMap<String, String>();
-        LineListDataValue llDataValue = new LineListDataValue();
+        
+        Map<String, String> llDataValueMap = new HashMap<String, String>();
         int i = 0;
         int lineListElementsSize = linelistElements.size() - 1;
         String leftReason = null;
         String pdsCode = "";
+        String pdsCodeColName = "pdscode";
+        String lastWorkingDateColumnName  = "lastworkingdate";
         for ( LineListElement linelistElement : linelistElements )
         {
-            
             String linelistElementValue = request.getParameter( linelistElement.getShortName() );
             System.out.println("i="+i+" The Linelist Element value is ::::::::: " + linelistElementValue );
 
@@ -174,40 +175,47 @@
                 i++;
                 continue;
             }
+         
             if ( linelistElementValue != null && linelistElementValue.trim().equals( "" ) )
             {
                 linelistElementValue = "";
             }
+          
             llElementValuesMap.put( linelistElement.getShortName(), linelistElementValue );
             i++;
         }
-
         String postColumnId = linelistElements.iterator().next().getShortName();
         llElementValuesMap.put( postColumnId, post );
-        System.out.println( "*********" + postColumnId + " ------ " + post + "**********" );
-
-        // add map in linelist data value
-        llDataValue.setLineListValues( llElementValuesMap );
-
-        // add period and source to row
-        llDataValue.setPeriod( historyPeriod );
-        llDataValue.setSource( organisationUnit );
-
-        // add stored by, timestamp in linelist data value
-        storedBy = currentUserService.getCurrentUsername();
-
-        if ( storedBy == null )
+        
+        llDataValueMap.put( pdsCodeColName, pdsCode );
+        llDataValueMap.put( lastWorkingDateColumnName, "null" );
+        llDataValueMap.put( postColumnId, post );
+        
+        List<LineListDataValue> llDataValueList = dbManagerInterface.getLLValuesFilterByLLElements( department, llDataValueMap, organisationUnit );
+        
+        LineListDataValue llDataValue = new LineListDataValue();
+        
+        if( llDataValueList != null && llDataValueList.size() != 0 )
         {
-            storedBy = "[unknown]";
+            llDataValue = llDataValueList.iterator().next();
+        
+            // add map in linelist data value
+            llDataValue.setLineListValues( llElementValuesMap );
+    
+            // add period and source to row
+            llDataValue.setPeriod( historyPeriod );
+    
+            // add stored by, timestamp in linelist data value
+            storedBy = currentUserService.getCurrentUsername();
+    
+            if ( storedBy == null )
+            {
+                storedBy = "[unknown]";
+            }
+    
+            llDataValue.setStoredBy( storedBy );
         }
-
-        llDataValue.setStoredBy( storedBy );
-        List<LineListDataValue> llDataValuesList = new ArrayList<LineListDataValue>();
-
-        llDataValuesList.add( llDataValue );
-        System.out.println("The values are ::::::::::" + llDataValuesList + " ----------and the table name is  " + department );
-
-        boolean valueUpdated = dbManagerInterface.updateLLValue( llDataValuesList, department );
+        boolean valueUpdated = dbManagerInterface.updateSingleLLValue( llDataValue, department );
 
         if ( valueUpdated )
         {
@@ -218,10 +226,16 @@
         
         System.out.println("The PDSCode is :" + pdsCode + " And LeftReason is :" + leftReason );
         
-        if( employee != null && leftReason == "Transfer Reason" )
+        if( employee != null && leftReason.equalsIgnoreCase( "Transfer Reason" ) )
         {
+            System.out.println("Inside Transfer reason" );
             employee.setIsTransferred( true );
             employeeService.updateEmployee( employee );
+            System.out.println("The value of Employee Transfer is :" + employee.getIsTransferred() );
+        }
+        else
+        {
+            System.out.println("Either Employee Object is null or left reason is different than transfer");
         }
 
         return SUCCESS;

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java'
--- local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java	2010-11-17 13:56:10 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/java/org/hisp/dhis/ll/action/lldataentry/ValidateEmployeeExistAction.java	2010-11-22 11:37:31 +0000
@@ -7,7 +7,6 @@
 import org.hisp.dhis.linelisting.Employee;
 import org.hisp.dhis.linelisting.EmployeeService;
 import org.hisp.dhis.linelisting.LineListGroup;
-import org.hisp.dhis.linelisting.LineListOption;
 import org.hisp.dhis.organisationunit.OrganisationUnit;
 
 import com.opensymphony.xwork2.Action;
@@ -65,8 +64,6 @@
         return message;
     }
     
-    //private String EMPLOYEEEXIST;
-    
     //--------------------------------------------------------------------------
     //Action Implementation
     //--------------------------------------------------------------------------
@@ -80,8 +77,11 @@
         String departmentLineListName = lineListGroup.getName();
         
         String pdsCodeColumnName = "pdscode";
+        String lastWorkingDateColumnName  = "lastworkingdate";
+        
         Map<String, String> llElementValueMap = new HashMap<String, String>();
         llElementValueMap.put( pdsCodeColumnName, pdsCode );
+        llElementValueMap.put( lastWorkingDateColumnName, "null" );
 
         if ( employee == null )
         {

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeeList.vm'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeeList.vm	2010-10-28 11:40:15 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeeList.vm	2010-11-22 11:37:31 +0000
@@ -69,5 +69,5 @@
 </table>
 
 <script type="text/javascript">
-    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_delete_line_list_option" ) , "'")';
+    var i18n_confirm_delete = '$encoder.jsEscape( $i18n.getString( "confirm_to_delete_employee" ) , "'")';
 </script>

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm	2010-11-20 12:16:50 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/employeePost.vm	2010-11-22 11:37:31 +0000
@@ -65,7 +65,7 @@
 			<input type="hidden" id="reportedDate" name="reportedDate">&nbsp;		
 		</td>
 		<td>
-			<input type="reset" value="Reset" onclick="window.location.href='showEmployeePostForm.action'" style="width:10em"> 
+			<input type="reset" value="Reset"> 
 		</td>
 	</tr>
 	</table>

=== modified file 'local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/employee.js'
--- local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/employee.js	2010-10-28 11:40:15 +0000
+++ local/bd/dhis-web-linelisting-manpower/src/main/webapp/dhis-web-linelisting-mp/javascript/employee.js	2010-11-22 11:37:31 +0000
@@ -4,7 +4,7 @@
 
 function removeEmployee( pdsCode, name )
 {
-	removeItem( pdsCode, name, confirm_to_delete_employee, 'removeEmployee.action' );
+	removeItem( pdsCode, name, i18n_confirm_delete, 'removeEmployee.action' );
 }
 
 function showEmployeeDetails( pdsCode )

=== modified file 'local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java'
--- local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java	2010-11-17 13:56:10 +0000
+++ local/in/dhis-in-services/dhis-in-service-dbmanager/src/main/java/org/hisp/dhis/dbmanager/DataBaseManagerInterface.java	2010-11-22 11:37:31 +0000
@@ -35,6 +35,8 @@
 
     public boolean updateLLValue( List<LineListDataValue> llDataValuesList, String tableName );
     
+    public boolean updateSingleLLValue( LineListDataValue llDataValue, String tableName );
+    
     public int getLLValueCountByLLElements( String tablename, Map<String,String> llElementValueMap, Source source );
     
     public List<LineListDataValue> getLLValuesFilterByLLElements( String tableName, Map<String,String> llElementValueMap, Source source, Period  period );