public int SetCustomerPreAssessmentStatus(int id, int status, string modifiedBy) { try { return(this.Gateway.ExecuteQueryNonQuery(SQLProvider.SetCustomerPreAssessmentStatusCommand, new StoredProcInParam("ID", DbType.Int32, id), new StoredProcInParam("Status", DbType.Int32, status), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }
public int Update(int id, int customerID, int kinshipID, bool urgentContact, bool alternativeContact, string modifiedBy) { try { return(this.Gateway.ExecuteQueryNonQuery(SQLProvider.UpdateNOKCommand, new StoredProcInParam("ID", DbType.Int32, id), new StoredProcInParam("CustomerID", DbType.Int32, customerID), new StoredProcInParam("KinshipID", DbType.Int32, kinshipID), new StoredProcInParam("UrgentContact", DbType.Boolean, urgentContact), new StoredProcInParam("AlternativeContact", DbType.Boolean, alternativeContact), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }
public int Insert(int personID, int customerID, int kinshipID, bool urgentContact, bool alternativeContact, string modifiedBy) { try { using (IDataReader reader = this.Gateway.ExecuteQueryReader(SQLProvider.InsertNOKCommand, new StoredProcInParam("PersonID", DbType.Int32, personID), new StoredProcInParam("CustomerID", DbType.Int32, customerID), new StoredProcInParam("KinshipID", DbType.Int32, kinshipID), new StoredProcInParam("UrgentContact", DbType.Boolean, urgentContact), new StoredProcInParam("AlternativeContact", DbType.Boolean, alternativeContact), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )) { return((IsEmptyReader(reader)) ? 0 : SIIConvert.ToInteger(reader["ID"].ToString())); } } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }
public int Update(int id, string modifiedBy) { try { return(this.Gateway.ExecuteQueryNonQuery(SQLProvider.UpdateHHRRStampCommand, new StoredProcInParam("ID", DbType.Int32, id), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }
public int Update(int id, string fileNumber, bool hasAvailability, bool admitNotification, bool includingEmail, string modifiedBy) { try { return(this.Gateway.ExecuteQueryNonQuery(SQLProvider.UpdateHHRRCommand, new StoredProcInParam("ID", DbType.Int32, id), new StoredProcInParam("FileNumber", DbType.String, SIIStrings.Left(fileNumber, FileNumberLength)), new StoredProcInParam("HasAvailability", DbType.Boolean, hasAvailability), new StoredProcInParam("AdmitNotification", DbType.Boolean, admitNotification), new StoredProcInParam("IncludingEmail", DbType.Boolean, includingEmail), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )); } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }
public int Insert(int personID, string fileNumber, bool hasAvailability, bool admitNotification, bool includingEmail, string modifiedBy) { try { using (IDataReader reader = this.Gateway.ExecuteQueryReader(SQLProvider.InsertHHRRCommand, new StoredProcInParam("PersonID", DbType.Int32, personID), new StoredProcInParam("FileNumber", DbType.String, SIIStrings.Left(fileNumber, FileNumberLength)), new StoredProcInParam("HasAvailability", DbType.Boolean, hasAvailability), new StoredProcInParam("AdmitNotification", DbType.Boolean, admitNotification), new StoredProcInParam("IncludingEmail", DbType.Boolean, includingEmail), new StoredProcInParam("ModifiedBy", DbType.String, SIIStrings.Left(modifiedBy, ModifiedByLength)) )) { return((IsEmptyReader(reader)) ? 0 : SIIConvert.ToInteger(reader["ID"].ToString())); } } catch (Exception ex) { if (ExceptionPolicy.HandleException(ex, ExceptionPolicies.DataAccess)) { throw; } return(0); } }