public DataTable Save(BatchDetail det, CompanyDetail companydet, string filePath, DataTable dtcounties) { Save(det); DataTable dtData = GetData(filePath); if (dtData.Rows.Count > 0) { DataTable dtDTSMapping = null; DataTable dtCaseTypeMapping = null; det.TotalCount = dtData.Rows.Count; det.CreatedDate = DateTime.Now; if (companydet.DTSMapping != null) { dtDTSMapping = (DataTable)XMLUtilities.Deserialize(companydet.DTSMapping, typeof(DataTable)); } if (companydet.CaseTypeMapping != null) { dtCaseTypeMapping = (DataTable)XMLUtilities.Deserialize(companydet.CaseTypeMapping, typeof(DataTable)); } Transform(det, ref dtData, dtDTSMapping, dtCaseTypeMapping, dtcounties); } else { throw new ApplicationException(ErrorConstants.EmptyBatchError); } return(dtData); }