public ExceptionTypes DProcessMoveQueue(string executeSp, out string errorMessage) { SqlParameter sqlParam; long lErrocode = 0; long lErrorNumber = 0; errorMessage = string.Empty; long lRowsEffected = 0; try { _lstParameters = new List <SqlParameter>(); //sqlParam = new SqlParameter(); //sqlParam.ParameterName = "@ErrorMessage"; //sqlParam.SqlDbType = SqlDbType.VarChar; //sqlParam.Value = string.Empty; //sqlParam.Direction = ParameterDirection.Output; //sqlParam.Size = 2000; //_lstParameters.Add(sqlParam); long executionResult = _daHelper.ExecuteDMLSP(executeSp, _lstParameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = _lstParameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } finally { _lstParameters = null; } }
public ExceptionTypes CheckValidRecordCount(long BulkImportID, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_FDRBulkImportId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = BulkImportID; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ImportStatusLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (long)ImportStatus.ImportSuccessful; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_UPD_FDRTotalRecordsCount, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
/// <summary> /// Method to update the cases for TRC155 Macro /// </summary> /// <param name="objDOMacroUpdate"></param> /// <param name="userid"></param> /// <returns></returns> public ExceptionTypes UpdateCaseForTRC155Macro(DOMacroUpdate objDOMacroUpdate, long userid, out string errormessage) { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; errormessage = string.Empty; SqlParameter sqlParam = new SqlParameter(); List <SqlParameter> _lstParameters = new List <SqlParameter>(); //call function to map object properties to SQL parameters for query execution sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_QueueId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMacroUpdate.GEN_QueueId; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@Status"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMacroUpdate.Status; _lstParameters.Add(sqlParam); //sqlParam = new SqlParameter(); //sqlParam.ParameterName = "@CurrentUser"; //sqlParam.SqlDbType = SqlDbType.VarChar; //sqlParam.Value = objDOMacroUpdate.LoginID; //_lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; _lstParameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_UPD_TRC155_Macro, _lstParameters.ToArray(), out lErrocode, out lErrorNumber, out long lRowsEffected, out string errorMessage); sqlParam = _lstParameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errormessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } }
public ExceptionTypes UpdateOOAMIIMComments(List <DOMIIMOOACommentUpdate> lstDOMIIMOOACommentUpdate, long userid) { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; SqlParameter sqlParam = new SqlParameter(); List <SqlParameter> _lstParameters = new List <SqlParameter>(); //call function to map object properties to SQL parameters for query execution if (lstDOMIIMOOACommentUpdate.Count() > 0) { DataSet ds = new DataSet("tbl_Comments"); ds.Tables.Add(lstDOMIIMOOACommentUpdate.Where(x => x.ERSCaseId != 0).ToList().ToDataTable()); string xmlData = ds.GetXml(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@XMLComments"; sqlParam.SqlDbType = SqlDbType.NVarChar; sqlParam.Value = xmlData; _lstParameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = userid; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; _lstParameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_APP_UPD_UpdateOOAComments, _lstParameters.ToArray(), out lErrocode, out lErrorNumber, out long lRowsEffected, out string errorMessage); sqlParam = _lstParameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } }
public ExceptionTypes GetIncludeInTodaysSubmission(out List <IncludeInTodaysSubmission> lstIncludeInTodaysSubmission, out string errorMessage) { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; lstIncludeInTodaysSubmission = new List <IncludeInTodaysSubmission>(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; try { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_BGP_SEL_IncludeInTodaysSubmission, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes SaveAlert(DOADM_AlertDetails objDOADM_AlertDetails, out string errorMessage) { errorMessage = string.Empty; try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; List <SqlParameter> parameters = new List <SqlParameter>(); //call function to map object properties to SQL parameters for query execution parameters = MapAlertDetailsAlertDO(objDOADM_AlertDetails); //Extra parameter when adding or editing record for releasing lock //not needed when searching records SqlParameter sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = (long)ScreenType.Alerts; parameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.USP_APP_INS_UPD_AlertsDetails, parameters.ToArray(), out lErrocode, out lErrocode, out lErrorNumber, out errorMessage); if (executionResult == 0) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
// Save Configuration Master public ExceptionTypes SaveConfigMaster(DOMGR_ConfigMaster objDOMGR_ConfigMaster, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ConfigId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMGR_ConfigMaster.MGR_ConfigMasterId; parameters.Add(sqlParam); if (!string.IsNullOrEmpty(objDOMGR_ConfigMaster.ConfigName)) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ConfigName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMGR_ConfigMaster.ConfigName; parameters.Add(sqlParam); } if (!string.IsNullOrEmpty(objDOMGR_ConfigMaster.ConfigValue)) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ConfigValue"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMGR_ConfigMaster.ConfigValue; parameters.Add(sqlParam); } if (objDOMGR_ConfigMaster.StartDate != null) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@StartDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMGR_ConfigMaster.StartDate; parameters.Add(sqlParam); } if (objDOMGR_ConfigMaster.EndDate != null) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@EndDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMGR_ConfigMaster.EndDate; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsActive"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOMGR_ConfigMaster.IsActive; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMGR_ConfigMaster.CreatedByRef; parameters.Add(sqlParam); //Extra parameter when adding or editing record for releasing lock sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (long)ScreenType.Configuration; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.USP_APP_INS_UPD_ConfigMaster, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); if (executionResult == 0) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes AddSkills(DOADM_SkillsMaster objDOADM_SkillsDetails, long lLoginId, out string errorMessage) { errorMessage = string.Empty; try { DAHelper dah = new DAHelper(); List <SqlParameter> parameters = new List <SqlParameter>(); long lErrorCode = 0; long lErrorNumber = 0; DataSet dsResultData = new DataSet(); SqlParameter sqlParam; if (objDOADM_SkillsDetails.ADM_SkillsMasterId != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ADM_SkillsMasterId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOADM_SkillsDetails.ADM_SkillsMasterId; parameters.Add(sqlParam); } if (!string.IsNullOrEmpty(objDOADM_SkillsDetails.SkillsName)) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SkillsName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.SkillsName; parameters.Add(sqlParam); } if (objDOADM_SkillsDetails.RoleLkup != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@RoleLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.RoleLkup; parameters.Add(sqlParam); } if (objDOADM_SkillsDetails.BusinessSegmentLkup != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@BusinessSegmentLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.BusinessSegmentLkup; parameters.Add(sqlParam); } if (objDOADM_SkillsDetails.DiscrepancyCategoryLkup != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DiscrepancyCategoryLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.DiscrepancyCategoryLkup; parameters.Add(sqlParam); } if (objDOADM_SkillsDetails.CMN_DepartmentRef != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CMN_DepartmentRef"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.CMN_DepartmentRef; parameters.Add(sqlParam); } if (objDOADM_SkillsDetails.WorkBasketLkup != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WorkBasketLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOADM_SkillsDetails.WorkBasketLkup; parameters.Add(sqlParam); } if (!string.IsNullOrEmpty(objDOADM_SkillsDetails.IsActive.ToString())) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsActive"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOADM_SkillsDetails.IsActive; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = lLoginId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = ScreenType.Skills; parameters.Add(sqlParam); if (objDOADM_SkillsDetails.lstDOADM_SkillWorkQueuesCorrelation.Count() > 0) { DataTable skillsWorkQueue; SetSkillsWorkQueue(objDOADM_SkillsDetails.lstDOADM_SkillWorkQueuesCorrelation, out skillsWorkQueue); DataTableReader dtrSkillWorkQueues = new DataTableReader(skillsWorkQueue); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TV_Queues"; sqlParam.SqlDbType = SqlDbType.Structured; sqlParam.Value = dtrSkillWorkQueues; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_APP_INS_UPD_Skills, parameters.ToArray(), out lErrorCode, out lErrorCode, out lErrorNumber, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
//save Department Master public ExceptionTypes SaveDepartment(DOCMN_Department objDOCMN_Department, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CMN_DepartmentId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOCMN_Department.CMN_DepartmentId; parameters.Add(sqlParam); if (!string.IsNullOrEmpty(objDOCMN_Department.ERSDepartmentName)) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ERSDepartmentName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOCMN_Department.ERSDepartmentName; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@BusinessSegmentLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOCMN_Department.BusinessSegmentLkup; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DepartmentLkup"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOCMN_Department.DepartmentLkup; parameters.Add(sqlParam); if (objDOCMN_Department.EffectiveDate != null) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@EffectiveDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOCMN_Department.EffectiveDate; parameters.Add(sqlParam); } if (objDOCMN_Department.InactivationDate != null) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@InactivationDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOCMN_Department.InactivationDate; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsActive"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOCMN_Department.IsActive; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOCMN_Department.CreatedByRef; parameters.Add(sqlParam); //Extra parameter when adding or editing record for releasing lock sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (long)ScreenType.Department; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; //if (objDOADM_UserMaster.ADM_UserMasterId == 0) //{ executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_APP_INS_UPD_Department, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); //} //else //{ // executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_APP_UPD_ADM_UserMaster, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); //} if (executionResult == 0) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes AddEditAccessGroup(long lLoggedInUserId, UIDOAccessGroup objUIDOAccessGroup, out string errorMessage) { errorMessage = string.Empty; try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lNumberOfRowsEffected = 0; DataSet dsTable = new DataSet(); List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; if (objUIDOAccessGroup.ADM_AccessGroupMasterId > 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ADM_AccessGroupMasterId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objUIDOAccessGroup.ADM_AccessGroupMasterId; parameters.Add(sqlParam); } if (objUIDOAccessGroup.AccessGroupName != string.Empty) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@AccessGroupName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objUIDOAccessGroup.AccessGroupName; parameters.Add(sqlParam); } if (objUIDOAccessGroup.AccessGroupDescription != string.Empty) { if (objUIDOAccessGroup.AccessGroupDescription == null) { objUIDOAccessGroup.AccessGroupDescription = ""; } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@AccessGroupDescription"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objUIDOAccessGroup.AccessGroupDescription; parameters.Add(sqlParam); } if (objUIDOAccessGroup.RoleLkup > 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@RoleLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objUIDOAccessGroup.RoleLkup; parameters.Add(sqlParam); } if (objUIDOAccessGroup.WorkBasketLkup > 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WorkBasketLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objUIDOAccessGroup.WorkBasketLkup; parameters.Add(sqlParam); } if (objUIDOAccessGroup.DescripancyCatLkup > 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DiscrepancyCategoryLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objUIDOAccessGroup.DescripancyCatLkup; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsActive"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objUIDOAccessGroup.IsActive; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = lLoggedInUserId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = ScreenType.AccessGroup; parameters.Add(sqlParam); if (objUIDOAccessGroup.lstDOADM_AccessGroupSkillsCorrelation.Count() > 0) { DataTable accessGroupSkills; SetAccessGroupSkills(objUIDOAccessGroup.lstDOADM_AccessGroupSkillsCorrelation, out accessGroupSkills); DataTableReader dtrAccessGroupSkills = new DataTableReader(accessGroupSkills); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TV_Skills"; sqlParam.SqlDbType = SqlDbType.Structured; sqlParam.Value = dtrAccessGroupSkills; parameters.Add(sqlParam); } if (objUIDOAccessGroup.lstDOADM_AccessGroupReportCorrelation.Count() > 0) { DataTable accessGroupReports; SetAccessGroupReports(objUIDOAccessGroup.lstDOADM_AccessGroupReportCorrelation, out accessGroupReports); DataTableReader dtrAccessGroupReport = new DataTableReader(accessGroupReports); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TV_Reports"; sqlParam.SqlDbType = SqlDbType.Structured; sqlParam.Value = dtrAccessGroupReport; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_APP_INS_UPD_AccessGroup, parameters.ToArray(), out lErrocode, out lErrorNumber, out lNumberOfRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { return(ExceptionTypes.UnknownError); } }
public ExceptionTypes SaveBulkUpload(DOGEN_BulkImport objDOGEN_BulkImport, long loginUserID, out string errorMessage) { _lstParameters = new List <SqlParameter>(); SqlParameter sqlParam; long lErrocode = 0; long lErrorNumber = 0; errorMessage = string.Empty; long lRowsEffected = 0; try { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WorkBasketLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_BulkImport.WorkBasketLkup; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DiscrepancyCategoryLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_BulkImport.DiscrepancyCategoryLkup; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_BulkImportExcelTemplateMasterRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_BulkImport.GEN_BulkImportExcelTemplateMasterRef; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ExcelFileName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_BulkImport.ExcelFileName; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DuplicateFileName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_BulkImport.DuplicateFileName; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ExcelFilelPath"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_BulkImport.ExcelFilelPath; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ImportStatusLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_BulkImport.ImportStatusLkup; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = loginUserID; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_BulkImportID"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Direction = ParameterDirection.Output; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; _lstParameters.Add(sqlParam); long executionResult = _daHelper.ExecuteDMLSP(ConstantTexts.SP_APP_INS_GEN_BulkImport, _lstParameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = _lstParameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } finally { _lstParameters = null; } }
public ExceptionTypes GetBulkImportID(out long BulkImportID, out string ExcelFilePath, out string errorMessage) { BulkImportID = 0; ExcelFilePath = string.Empty; try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_FDRBulkImportId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 200000000; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ExcelFilePath"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_SEL_FDR_BulkImportPath, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@GEN_FDRBulkImportId"); if (sqlParam != null && sqlParam.Value != null) { BulkImportID = Convert.ToInt64(sqlParam.Value); } sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ExcelFilePath"); if (sqlParam != null && sqlParam.Value != null) { ExcelFilePath = Convert.ToString(sqlParam.Value); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes InsertFDRStagingData(DOGEN_FDR objDOGEN_FDR, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_FDRBulkImportId"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.FDRBulkImportID; parameters.Add(sqlParam); sqlParam = new SqlParameter(); //DataTableReader drTable = new DataTableReader(objDOGEN_FDR.dtExcelData); DataSet ds = new DataSet("TVP_FDRStaging"); ds.Tables.Add(objDOGEN_FDR.dtExcelData); string xmlData = ds.GetXml(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@XMLData"; sqlParam.SqlDbType = SqlDbType.NVarChar; sqlParam.Value = xmlData; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); DataSet dsResult = new DataSet(); long executionResult = 0; executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_INS_FDR_Staging, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); // executionResult = dah.ExecuteSelectSP(ConstantTexts.SP_USP_BGP_INS_FDR_Staging, parameters.ToArray(),out dsResult, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes UpdateRPRQueue(long QueueID, string CMSProcessDate, string DispositionCode, string DispositionCodeDescription, long TransactionTypeLkup, out string errorMessage) { errorMessage = string.Empty; try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_QueueId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = QueueID; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CMSProcessDate"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = CMSProcessDate; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DispositionCode"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = DispositionCode; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DispositionCodeDescription"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = DispositionCodeDescription; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TransactionTypeLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = TransactionTypeLkup; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_UPD_RPR_Queue, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes UpdatMQTRRCaseDetails(long lMQTRRWorkQueueItemId, long lMQSourceTypeLkup, long lUpdateCMSTransactionCaseNumber, long CurrentUserId, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; long executionResult = 0; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQTRRWorkQueueItemsId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = lMQTRRWorkQueueItemId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQSourceTypeLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = lMQSourceTypeLkup; parameters.Add(sqlParam); if (lUpdateCMSTransactionCaseNumber != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_QueueId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = lUpdateCMSTransactionCaseNumber; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CurrentUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = CurrentUserId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_INS_UPD_MQTRRProcess, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { Console.WriteLine("Error : " + ex.Message); errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes InsertFDRBulkImport(DOGEN_FDR objDOGEN_FDR, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SubmissionId"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.SubmissionID; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ContractNumber"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.ContractNumber; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TransactionType"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.TransactionTypeLValue; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ExcelFileName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.ExcelFileName; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ExcelFilePath"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_FDR.ExcelFilePath; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ImportStatusLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (long)ImportStatus.ReadyForImport; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_INS_FDR_BulkImport, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
/// <summary> /// Save/Update LookupType /// </summary> /// <param name="objDOCMN_LookupType"></param> /// <param name="errorMessage"></param> /// <returns></returns> public ExceptionTypes SaveLookupType(DOCMN_LookupType objDOCMN_LookupType, out string errorMessage) { _lstParameters = new List <SqlParameter>(); SqlParameter sqlParam; long lErrocode = 0; long lErrorNumber = 0; errorMessage = string.Empty; long lRowsEffected = 0; try { if (objDOCMN_LookupType.CMN_LookupTypeId > 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CMN_LookupTypeId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOCMN_LookupType.CMN_LookupTypeId; _lstParameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LookupTypeDescription"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOCMN_LookupType.LookupTypeDescription; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsActive"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOCMN_LookupType.IsActive; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ScreenLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = ScreenType.LookupType; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (objDOCMN_LookupType.CMN_LookupTypeId > 0) ? objDOCMN_LookupType.LastUpdatedByRef : objDOCMN_LookupType.CreatedByRef; _lstParameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; _lstParameters.Add(sqlParam); long executionResult = _daHelper.ExecuteDMLSP(ConstantTexts.SP_APP_INS_UPD_LookupType, _lstParameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = _lstParameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } finally { _lstParameters = null; } }
public ExceptionTypes UpdateXMLMessage(MQMessagesRecieved objMQMessagesRecieved, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQMessagesRecievedId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.MQMessagesRecievedId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsProcessed"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objMQMessagesRecieved.IsProcessed; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ProcessedResult"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objMQMessagesRecieved.ProcessedResult; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SystemId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.SystemId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQTRRWorkQueueItemRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objMQMessagesRecieved.MQTRRWorkQueueItemRef; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ProcessingFailReason"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objMQMessagesRecieved.ProcessingFailReason; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_UPD_MQMessagesRecieved, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { Console.WriteLine("Error : " + ex.Message); errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes UpdateFDRPackageDate(List <long> caseIds, FDRSubmissionCategory submissionCategory, long LoginUserId, out string errorMessage) { string strCaseIds = String.Concat(caseIds.Select(x => x.ToString() + ",")); errorMessage = string.Empty; try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CaseIds"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = strCaseIds; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@FDRSubmissionCategoryLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = (long)submissionCategory; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = LoginUserId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_UPD_FDRPackageDates, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes InsertAEGPSServiceTrace(DOGEN_AEGPSServiceTrace objDOGEN_AEGPSServiceTrace) { long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; string errorMessage = string.Empty; try { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GEN_QueueRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_AEGPSServiceTrace.GEN_QueueRef; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WebServiceMethodLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_AEGPSServiceTrace.WebServiceMethodLkup; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WebServiceMethodName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_AEGPSServiceTrace.WebServiceMethodName; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@RequestData"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_AEGPSServiceTrace.RequestData; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ResponseData"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOGEN_AEGPSServiceTrace.ResponseData; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CreatedByRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_AEGPSServiceTrace.CreatedByRef; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@Statuslkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOGEN_AEGPSServiceTrace.StatusLkup; parameters.Add(sqlParam); //sqlParam = new SqlParameter(); //sqlParam.ParameterName = "@ErrorMessage"; //sqlParam.SqlDbType = SqlDbType.VarChar; //sqlParam.Value = string.Empty; //sqlParam.Direction = ParameterDirection.Output; //sqlParam.Size = 2000; //parameters.Add(sqlParam); long executionResult = 0; executionResult = _objDAHelper.ExecuteDMLSP(ConstantTexts.SP_USP_APP_INS_GEN_AEGPSServiceTrace, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); if (executionResult == 0) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { return(ExceptionTypes.UnknownError); } }
public ExceptionTypes InsertFDRSubmissionLog(List <FDRSubmissionRow> lstCases, long LoginUserId, bool IsFDRSubmissionCompleted, string errormessage, out string errorMessage) { FDRSubmissionRow objFDRSubmissionRow = new FDRSubmissionRow(); try { DAHelper dah = new DAHelper(); List <SqlParameter> parameters = new List <SqlParameter>(); long lErrorCode = 0; long lErrorNumber = 0; DataSet dsResultData = new DataSet(); SqlParameter sqlParam; if (lstCases.Count() > 0) { DataTable dtCases; SetFDRSubmissionLog(lstCases, IsFDRSubmissionCompleted, errormessage, out dtCases); DataTableReader dtrFDRSubmissionLog = new DataTableReader(dtCases); //DataSet ds = new DataSet("TVP_FDRStaging"); //ds.Tables.Add(dtCases); //string xmlData = ds.GetXml(); //sqlParam = new SqlParameter(); //sqlParam.ParameterName = "@XMLData"; //sqlParam.SqlDbType = SqlDbType.NVarChar; //sqlParam.Value = xmlData; //parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TVP_FDRSubmissionLog"; sqlParam.SqlDbType = SqlDbType.Structured; sqlParam.Value = dtrFDRSubmissionLog; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LoginUserId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = LoginUserId; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_APP_INS_FDRSubmissionLog, parameters.ToArray(), out lErrorCode, out lErrorCode, out lErrorNumber, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }
public ExceptionTypes InsertMQTRRRecord(DOMQTRRWorkQueueItems objDOMQTRRWorkQueueItems, long CurrentMasterUserId, out string errorMessage) { try { DAHelper dah = new DAHelper(); long lErrocode = 0; long lErrorNumber = 0; long lRowsEffected = 0; DataSet dsTable = new DataSet(); errorMessage = string.Empty; List <SqlParameter> parameters = new List <SqlParameter>(); SqlParameter sqlParam; sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQSourceTypeLkup"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMQTRRWorkQueueItems.MQSourceTypeLkup; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@WQTrackingNumber"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.WQTrackingNumber.IsNullOrEmpty() ? "00000" : objDOMQTRRWorkQueueItems.WQTrackingNumber; parameters.Add(sqlParam); if (!objDOMQTRRWorkQueueItems.MemberID.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MemberId"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.MemberID; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.IndividualID.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IndividualID"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.IndividualID; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.HICN.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@HICN"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.HICN; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.HouseHoldID.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@HouseholdID"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.HouseHoldID; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.Contract.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@Contract"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.Contract; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.PBP.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@PBP"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.PBP; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.FirstName.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@FirstName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.FirstName; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.MiddleName.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MiddleName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.MiddleName; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.LastName.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LastName"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.LastName; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.DOB.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DOB"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMQTRRWorkQueueItems.DOB; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.SCCCode.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SCCCode"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.SCCCode; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.LOB.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@LOB"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.LOB; parameters.Add(sqlParam); } if (objDOMQTRRWorkQueueItems.DisenrollementPeriod != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@DisenrollementPeriod"; sqlParam.SqlDbType = SqlDbType.Int; sqlParam.Value = objDOMQTRRWorkQueueItems.DisenrollementPeriod; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.TRC.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TRC"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.TRC; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.TRCTypeCode.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TRCTypeCode"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.TRCTypeCode; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.TimelineEffectiveDate.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TimelineEffectiveDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMQTRRWorkQueueItems.TimelineEffectiveDate; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.TRRFileReceiptDate.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TRRFileReceiptDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMQTRRWorkQueueItems.TRRFileReceiptDate; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.PlanTerminationDate.IsNullOrEmpty() && objDOMQTRRWorkQueueItems.PlanTerminationDate != new DateTime()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@PlanTerminationDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMQTRRWorkQueueItems.PlanTerminationDate; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.ReasonDescription.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ReasonDescription"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.ReasonDescription; parameters.Add(sqlParam); } if (objDOMQTRRWorkQueueItems.ERSCaseNumber != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ERSCaseNumber"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMQTRRWorkQueueItems.ERSCaseNumber; parameters.Add(sqlParam); } if (objDOMQTRRWorkQueueItems.CMN_BackgroundProcessMasterRef != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@CMN_BackgroundProcessMasterRef"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = objDOMQTRRWorkQueueItems.CMN_BackgroundProcessMasterRef; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.TrrRecordID.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@TrrRecordID"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.TrrRecordID; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.GPSProposedEffectiveDate.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GPSProposedEffectiveDate"; sqlParam.SqlDbType = SqlDbType.DateTime; sqlParam.Value = objDOMQTRRWorkQueueItems.GPSProposedEffectiveDate; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.GPSPDPAutoEnroleeIndicator.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GPSPDPAutoEnroleeIndicator"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOMQTRRWorkQueueItems.GPSPDPAutoEnroleeIndicator; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.GPSApplicationStatus.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GPSApplicationStatus"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.GPSApplicationStatus; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.GPSContract.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GPSContract"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.GPSContract; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.GPSPBP.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@GPSPBP"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.GPSPBP; parameters.Add(sqlParam); } if (!objDOMQTRRWorkQueueItems.EmployerId.IsNullOrEmpty()) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@EmployerId"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = objDOMQTRRWorkQueueItems.EmployerId; parameters.Add(sqlParam); } if (CurrentMasterUserId != 0) { sqlParam = new SqlParameter(); sqlParam.ParameterName = "@SystemId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = CurrentMasterUserId; parameters.Add(sqlParam); } sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsRestricted"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOMQTRRWorkQueueItems.IsRestricted; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@IsNationalEmployee"; sqlParam.SqlDbType = SqlDbType.Bit; sqlParam.Value = objDOMQTRRWorkQueueItems.IsNationalEmployee; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@MQTRRWorkQueueItemId"; sqlParam.SqlDbType = SqlDbType.BigInt; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; parameters.Add(sqlParam); sqlParam = new SqlParameter(); sqlParam.ParameterName = "@ErrorMessage"; sqlParam.SqlDbType = SqlDbType.VarChar; sqlParam.Value = string.Empty; sqlParam.Direction = ParameterDirection.Output; sqlParam.Size = 2000; parameters.Add(sqlParam); long executionResult = 0; executionResult = dah.ExecuteDMLSP(ConstantTexts.SP_USP_BGP_INS_MQTRRWorkQueueItems, parameters.ToArray(), out lErrocode, out lErrorNumber, out lRowsEffected, out errorMessage); sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@ErrorMessage"); if (sqlParam != null && sqlParam.Value != null) { errorMessage += sqlParam.Value.ToString(); } sqlParam = parameters.FirstOrDefault(x => x.ParameterName == "@MQTRRWorkQueueItemId"); if (sqlParam != null && sqlParam.Value != null && Int64.TryParse(sqlParam.Value.ToString(), out long Id)) { objDOMQTRRWorkQueueItems.MQTRRWorkQueueItemId = Id; } if (executionResult == (long)ExceptionTypes.Success && string.IsNullOrEmpty(errorMessage)) { return(ExceptionTypes.Success); } else { return(ExceptionTypes.UnknownError); } } catch (Exception ex) { errorMessage = ex.Message; return(ExceptionTypes.UnknownError); } }