public static HR_ContactInformation GetHR_EmployeeByEmployeeID(string EmployeeID) { HR_ContactInformation hR_ContactInformation = new HR_ContactInformation(); SqlHR_ContactInformationProvider sqlHR_ContactInformationProvider = new SqlHR_ContactInformationProvider(); hR_ContactInformation = sqlHR_ContactInformationProvider.GetHR_ContactInformationByEmployeeID(EmployeeID); return hR_ContactInformation; }
public static HR_ContactInformation GetHR_ContactInformationByContactInformationID(int ContactInformationID) { HR_ContactInformation hR_ContactInformation = new HR_ContactInformation(); SqlHR_ContactInformationProvider sqlHR_ContactInformationProvider = new SqlHR_ContactInformationProvider(); hR_ContactInformation = sqlHR_ContactInformationProvider.GetHR_ContactInformationByContactInformationID(ContactInformationID); return hR_ContactInformation; }
public bool UpdateHR_ContactInformation(HR_ContactInformation hR_ContactInformation) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("UpdateHR_ContactInformation", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@ContactInformationID", SqlDbType.Int).Value = hR_ContactInformation.ContactInformationID; cmd.Parameters.Add("@EmployeeID", SqlDbType.NVarChar).Value = hR_ContactInformation.EmployeeID; cmd.Parameters.Add("@CurrentAddress", SqlDbType.NVarChar).Value = hR_ContactInformation.CurrentAddress; cmd.Parameters.Add("@ParmanentAddress", SqlDbType.NVarChar).Value = hR_ContactInformation.ParmanentAddress; cmd.Parameters.Add("@Email", SqlDbType.NVarChar).Value = hR_ContactInformation.Email; cmd.Parameters.Add("@Telephone", SqlDbType.NVarChar).Value = hR_ContactInformation.Telephone; cmd.Parameters.Add("@Mobile", SqlDbType.NVarChar).Value = hR_ContactInformation.Mobile; cmd.Parameters.Add("@Mobile", SqlDbType.NVarChar).Value = hR_ContactInformation.Mobile; cmd.Parameters.Add("@Mobile", SqlDbType.NVarChar).Value = hR_ContactInformation.Mobile; cmd.Parameters.Add("@ModifiedBy", SqlDbType.NVarChar).Value = hR_ContactInformation.ModifiedBy; cmd.Parameters.Add("@ModifiedDate", SqlDbType.DateTime).Value = hR_ContactInformation.ModifiedDate; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }
public HR_ContactInformation GetHR_ContactInformationFromReader(IDataReader reader) { try { HR_ContactInformation hR_ContactInformation = new HR_ContactInformation ( DataAccessObject.IsNULL<int>(reader["ContactInformationID"]), DataAccessObject.IsNULL<string>(reader["EmployeeID"].ToString()), DataAccessObject.IsNULL<string>(reader["CurrentAddress"]), DataAccessObject.IsNULL<string>(reader["ParmanentAddress"]), DataAccessObject.IsNULL<string>(reader["Email"]), DataAccessObject.IsNULL<string>(reader["Telephone"]), DataAccessObject.IsNULL<string>(reader["Mobile"]), DataAccessObject.IsNULL<string>(reader["AddedBy"].ToString()), DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]), DataAccessObject.IsNULL<string>(reader["ModifiedBy"].ToString()), DataAccessObject.IsNULL<DateTime>(reader["ModifiedDate"]) ); return hR_ContactInformation; } catch(Exception ex) { return null; } }
public static int InsertHR_ContactInformation(HR_ContactInformation hR_ContactInformation) { SqlHR_ContactInformationProvider sqlHR_ContactInformationProvider = new SqlHR_ContactInformationProvider(); return sqlHR_ContactInformationProvider.InsertHR_ContactInformation(hR_ContactInformation); }
public static bool UpdateHR_ContactInformation(HR_ContactInformation hR_ContactInformation) { SqlHR_ContactInformationProvider sqlHR_ContactInformationProvider = new SqlHR_ContactInformationProvider(); return sqlHR_ContactInformationProvider.UpdateHR_ContactInformation(hR_ContactInformation); }