コード例 #1
0
 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;
 }
コード例 #2
0
 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;
 }
コード例 #3
0
    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;
        }
    }
コード例 #4
0
    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;
        }
    }
コード例 #5
0
 public static int InsertHR_RetirementsRuleEmployee(HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee)
 {
     SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider();
     return sqlHR_RetirementsRuleEmployeeProvider.InsertHR_RetirementsRuleEmployee(hR_RetirementsRuleEmployee);
 }
コード例 #6
0
 public static bool UpdateHR_RetirementsRuleEmployee(HR_RetirementsRuleEmployee hR_RetirementsRuleEmployee)
 {
     SqlHR_RetirementsRuleEmployeeProvider sqlHR_RetirementsRuleEmployeeProvider = new SqlHR_RetirementsRuleEmployeeProvider();
     return sqlHR_RetirementsRuleEmployeeProvider.UpdateHR_RetirementsRuleEmployee(hR_RetirementsRuleEmployee);
 }