DataTable HrDt = mHRTxnSAPData.ListDetail_OF_SentDocToSAP(comp_code, module, start_sap_date, end_sap_date
                                   , start_doc_date, end_doc_date, crem_type, Process_name, success, type);
                             
                foreach (DataRow dr in HrDt.Rows)
                {
                    //save to arrayList
                    strPin = dr[TableManager.WFCremation.PIN].ToString();
                    if (mList.IndexOf(strPin) == -1)
                    {
                        mList.Add(strPin);

                        if (type == “CR”)
                        {
                            strPin = dr[TableManager.WFCremation.HR_PIN].ToString();
                            if (mList.IndexOf(strPin) == -1)
                                mList.Add(strPin);
                        }
                    }

                    //save to hash(org info) —
                    strOrgInfo = dr[TableManager.WFCremation.NEAR_ORG_ID].ToString();
                    if (strOrgInfo != string.Empty)
                    {
                        if (!hashOrgInfo.ContainsKey(strOrgInfo))
                        {
                            OrgDs = mOMEHRService.GetOrgInfobyOrgCode(strOrgInfo);
                            if (OrgDs.Tables[0].Rows.Count > 0)
                                hashOrgInfo[strOrgInfo] = OrgDs.Tables[0].Rows[0][TableManager.Employee.ORG_DESC].ToString();
                        }
                    }

                }

                for (int a = 0; a < mList.Count; a++)
                {
                    if (strPin != string.Empty)
                        strPin = strPin + “,”;

                    strPin = strPin + mList[a].ToString();
                }

                //call ws for employee profile —
                dsProfile = mOMEHRService.ListEmployeeProfileByPIN(strPin);

———- calling  ——————

DataRow[] drProfile;

drProfile = dsProfile.Tables[0].Select(” PIN='” + HrDr[TableManager.WFCremation.PIN].ToString() + “‘”);if (drProfile.Length != 0){

Pin_name = drProfile[0][“THFIRSTNAME”].ToString() + ” “ + drProfile[0][“THLASTNAME”].ToString();Position = drProfile[0][

TableManager.Employee.POSI_DESC].ToString();}