string _query = @"SELECT FI.EMP_ID,FI.EFI_SEQUENCENO,FI.EFI_NAME,FI.EFI_EMAIL,FI.EFI_ADDRESS,FI.EFI_DOB, FI.EFI_FAXNO,FI.EFI_NEXTOFKIN,FI.EFI_PHONE,FI.EFI_PHONE,FI.EFI_REMARKS,FI.BLG_ID,BLG.BLG_TITLE, FI.CTY_ID,CTY.CTY_TITLE,FI.GEN_ID,GEN.GEN_TITLE,FI.RLA_ID,REL.RLA_TITLE,'Actual' status_ ,'0' refno_,fi.ACTION_TAG action_ FROM SETUP_EMP_FAMILYINFO FI INNER JOIN SETUP_EMPLOYEE EMP ON FI.EMP_ID=EMP.EMP_ID LEFT OUTER JOIN SYS_SETUP_GENDER GEN ON FI.GEN_ID=GEN.GEN_ID LEFT OUTER JOIN SETUP_CITY CTY ON FI.CTY_ID=CTY.CTY_ID INNER JOIN SYS_SETUP_EMP_RELATION REL ON FI.RLA_ID=REL.RLA_ID LEFT OUTER JOIN SETUP_EMP_BLOODGROUP BLG ON FI.BLG_ID=BLG.BLG_ID WHERE FI.EMP_ID ='" + _id + @"' AND (FI.ACTION_TAG = '' OR fi.ACTION_TAG is Null OR fi.ACTION_TAG='Approve' OR fi.ACTION_TAG='Reject') union SELECT FIP.EMP_ID,FIP.EFI_SEQUENCENO,FIP.EFI_NAME,FIP.EFI_EMAIL,FIP.EFI_ADDRESS,FIP.EFI_DOB, FIP.EFI_FAXNO,FIP.EFI_NEXTOFKIN,FIP.EFI_PHONE,FIP.EFI_PHONE,FIP.EFI_REMARKS,FIP.BLG_ID,BLG.BLG_TITLE, FIP.CTY_ID,CTY.CTY_TITLE,FIP.GEN_ID,GEN.GEN_TITLE,FIP.RLA_ID,REL.RLA_TITLE,'Pending' status_ ,fip.REF_NO refno_,fip.ACTION_TAG action_ FROM SETUP_EMP_FAMILYINFO_PENDING FIP INNER JOIN SETUP_EMPLOYEE EMP ON FIP.EMP_ID=EMP.EMP_ID LEFT OUTER JOIN SYS_SETUP_GENDER GEN ON FIP.GEN_ID=GEN.GEN_ID LEFT OUTER JOIN SETUP_CITY CTY ON FIP.CTY_ID=CTY.CTY_ID INNER JOIN SYS_SETUP_EMP_RELATION REL ON FIP.RLA_ID=REL.RLA_ID LEFT OUTER JOIN SETUP_EMP_BLOODGROUP BLG ON FIP.BLG_ID=BLG.BLG_ID WHERE FIP.EMP_ID='" + _id + @"' AND (FIP.ACTION_TAG='Submit' OR FIP.ACTION_TAG='Edit' OR FIP.ACTION_TAG='Delete')";