public static HR_RetirementsRuleEmployee GetHR_RetirementsRuleEmployeeByRetirementRulesID(int RetirementRulesID) { HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee = new HR_RetirementsRuleEmployee(); SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider(); hR_RetirementsRuleEmployee = sqlHR_RetirementsRuleEmployeeProvider.GetHR_RetirementsRuleEmployeeByRetirementRulesID(RetirementRulesID); return hR_RetirementsRuleEmployee; }
public static HR_RetirementsRuleEmployee GetHR_EmployeeByEmployeeID(string EmployeeID) { HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee = new HR_RetirementsRuleEmployee(); SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider(); hR_RetirementsRuleEmployee = sqlHR_RetirementsRuleEmployeeProvider.GetHR_RetirementsRuleEmployeeByEmployeeID(EmployeeID); return hR_RetirementsRuleEmployee; }
public bool UpdateHR_RetirementsRuleEmployee(HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("UpdateHR_RetirementsRuleEmployee", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@RetirementRulesID", SqlDbType.Int).Value = hR_RetirementsRuleEmployee.RetirementRulesID; cmd.Parameters.Add("@EmployeeID", SqlDbType.NVarChar).Value = hR_RetirementsRuleEmployee.EmployeeID; cmd.Parameters.Add("@RetirementRulesName", SqlDbType.NVarChar).Value = hR_RetirementsRuleEmployee.RetirementRulesName; cmd.Parameters.Add("@RetirementRulesName", SqlDbType.NVarChar).Value = hR_RetirementsRuleEmployee.RetirementRulesName; cmd.Parameters.Add("@RetirementRulesName", SqlDbType.NVarChar).Value = hR_RetirementsRuleEmployee.RetirementRulesName; cmd.Parameters.Add("@ModifiedBy", SqlDbType.NVarChar).Value = hR_RetirementsRuleEmployee.ModifiedBy; cmd.Parameters.Add("@ModifiedDate", SqlDbType.DateTime).Value = hR_RetirementsRuleEmployee.ModifiedDate; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }
public HR_RetirementsRuleEmployee GetHR_RetirementsRuleEmployeeFromReader(IDataReader reader) { try { HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee = new HR_RetirementsRuleEmployee ( DataAccessObject.IsNULL<int>(reader["RetirementRulesID"]), DataAccessObject.IsNULL<string>(reader["EmployeeID"].ToString()), DataAccessObject.IsNULL<string>(reader["RetirementRulesName"]), DataAccessObject.IsNULL<string>(reader["AddedBy"].ToString()), DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]), DataAccessObject.IsNULL<string>(reader["ModifiedBy"].ToString()), DataAccessObject.IsNULL<DateTime>(reader["ModifiedDate"]) ); return hR_RetirementsRuleEmployee; } catch(Exception ex) { return null; } }
public static int InsertHR_RetirementsRuleEmployee(HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee) { SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider(); return sqlHR_RetirementsRuleEmployeeProvider.InsertHR_RetirementsRuleEmployee(hR_RetirementsRuleEmployee); }
public static bool UpdateHR_RetirementsRuleEmployee(HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee) { SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider(); return sqlHR_RetirementsRuleEmployeeProvider.UpdateHR_RetirementsRuleEmployee(hR_RetirementsRuleEmployee); }