public static HR_SalaryAdjustmentGroup GetHR_SalaryAdjustmentBySalaryAdjustmentID(int SalaryAdjustmentID) { HR_SalaryAdjustmentGroup hR_SalaryAdjustment = new HR_SalaryAdjustmentGroup(); SqlHR_SalaryAdjustmentGroupProvider sqlHR_SalaryAdjustmentProvider = new SqlHR_SalaryAdjustmentGroupProvider(); hR_SalaryAdjustment = sqlHR_SalaryAdjustmentProvider.GetHR_SalaryAdjustmentGroupBySalaryAdjustmentGroupID(SalaryAdjustmentID); return hR_SalaryAdjustment; }
public static HR_SalaryAdjustmentGroup GetHR_EmployeeByEmployeeID(string EmployeeID) { HR_SalaryAdjustmentGroup hR_SalaryAdjustment = new HR_SalaryAdjustmentGroup(); SqlHR_SalaryAdjustmentGroupProvider sqlHR_SalaryAdjustmentProvider = new SqlHR_SalaryAdjustmentGroupProvider(); hR_SalaryAdjustment = sqlHR_SalaryAdjustmentProvider.GetHR_SalaryAdjustmentGroupByEmployeeID(EmployeeID); return hR_SalaryAdjustment; }
protected void btnAddGroup_Click(object sender, EventArgs e) { HR_SalaryAdjustmentGroup salaryAdjustmentGroup = new HR_SalaryAdjustmentGroup(); salaryAdjustmentGroup.GroupName = txtAdjustmentGroupName.Text.Trim(); string userID = Profile.card_id; salaryAdjustmentGroup.AddedBy = userID; salaryAdjustmentGroup.AddedDate = DateTime.Now; HR_SalaryAdjustmentGroupManager.InsertHR_SalaryAdjustment(salaryAdjustmentGroup); FillDropDownList(); }
public static bool UpdateHR_SalaryAdjustment(HR_SalaryAdjustmentGroup hR_SalaryAdjustment) { SqlHR_SalaryAdjustmentGroupProvider sqlHR_SalaryAdjustmentProvider = new SqlHR_SalaryAdjustmentGroupProvider(); return sqlHR_SalaryAdjustmentProvider.UpdateHR_SalaryAdjustmentGroup(hR_SalaryAdjustment); }
public static int InsertHR_SalaryAdjustment(HR_SalaryAdjustmentGroup hR_SalaryAdjustment) { SqlHR_SalaryAdjustmentGroupProvider sqlHR_SalaryAdjustmentProvider = new SqlHR_SalaryAdjustmentGroupProvider(); return sqlHR_SalaryAdjustmentProvider.InsertHR_SalaryAdjustmentGroup(hR_SalaryAdjustment); }
public bool UpdateHR_SalaryAdjustmentGroup(HR_SalaryAdjustmentGroup hR_SalaryAdjustmentGroup) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("UpdateHR_SalaryAdjustmentGroup", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@SalaryAdjustmentGroupID", SqlDbType.Int).Value = hR_SalaryAdjustmentGroup.SalaryAdjustmentGroupID; cmd.Parameters.Add("@GroupName", SqlDbType.NVarChar).Value = hR_SalaryAdjustmentGroup.GroupName; cmd.Parameters.Add("@ModifiedBy", SqlDbType.DateTime).Value = hR_SalaryAdjustmentGroup.ModifiedBy; cmd.Parameters.Add("@ModifiedDate", SqlDbType.NVarChar).Value = hR_SalaryAdjustmentGroup.ModifiedDate; connection.Open(); int result = cmd.ExecuteNonQuery(); return result == 1; } }
public int InsertHR_SalaryAdjustmentGroup(HR_SalaryAdjustmentGroup hR_SalaryAdjustmentGroup) { using (SqlConnection connection = new SqlConnection(this.ConnectionString)) { SqlCommand cmd = new SqlCommand("InsertHR_SalaryAdjustmentGroup", connection); cmd.CommandType = CommandType.StoredProcedure; cmd.Parameters.Add("@SalaryAdjustmentGroupID", SqlDbType.Int).Direction = ParameterDirection.Output; cmd.Parameters.Add("@GroupName", SqlDbType.NVarChar).Value = hR_SalaryAdjustmentGroup.GroupName; cmd.Parameters.Add("@AddedBy", SqlDbType.NVarChar).Value = hR_SalaryAdjustmentGroup.AddedBy; cmd.Parameters.Add("@AddedDate", SqlDbType.DateTime).Value = hR_SalaryAdjustmentGroup.AddedDate; connection.Open(); int result = cmd.ExecuteNonQuery(); return (int)cmd.Parameters["@SalaryAdjustmentGroupID"].Value; } }
public HR_SalaryAdjustmentGroup GetHR_SalaryAdjustmentGroupFromReader(IDataReader reader) { try { HR_SalaryAdjustmentGroup hR_SalaryAdjustment = new HR_SalaryAdjustmentGroup ( DataAccessObject.IsNULL<int>(reader["SalaryAdjustmentGroupID"]), DataAccessObject.IsNULL<string>(reader["GroupName"].ToString()), DataAccessObject.IsNULL<string>(reader["AddedBy"]), DataAccessObject.IsNULL<DateTime>(reader["AddedDate"]), DataAccessObject.IsNULL<string>(reader["ModifiedBy"]), DataAccessObject.IsNULL<DateTime>(reader["ModifiedDate"]) ); return hR_SalaryAdjustment; } catch(Exception ex) { return null; } }