public static PayComponent GetPayComponentById(int recordId) { DataRow PayComponentRow = PayComponentDataAccess.GetInstance.GetPayComponentById(recordId); PayComponent ThePayComponent = new PayComponent(); ThePayComponent.PayComponentID = int.Parse(PayComponentRow["PayComponentID"].ToString()); ThePayComponent.PayComponentDescription = PayComponentRow["PayComponentDescription"].ToString(); ThePayComponent.PayComponentType = PayComponentRow["PayComponentType"].ToString(); ThePayComponent.DisplayOrder = int.Parse(PayComponentRow["DisplayOrder"].ToString()); ThePayComponent.IsActive = bool.Parse(PayComponentRow["IsActive"].ToString()); return(ThePayComponent); }
public int DeletePayCompenent(PayComponent thePayComponent) { int ReturnValue = 0; SqlCommand DeleteCommand = new SqlCommand(); DeleteCommand.CommandType = CommandType.StoredProcedure; DeleteCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; DeleteCommand.Parameters.Add(GetParameter("@PayComponentID", SqlDbType.Int, thePayComponent.PayComponentID)); DeleteCommand.CommandText = "pHRM_PayComponents_Delete"; ExecuteStoredProcedure(DeleteCommand); ReturnValue = int.Parse(DeleteCommand.Parameters[0].Value.ToString()); return(ReturnValue); }
public int InsertPayComponent(PayComponent thePayComponent) { int ReturnValue = 0; SqlCommand InsertCommand = new SqlCommand(); InsertCommand.CommandType = CommandType.StoredProcedure; InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; InsertCommand.Parameters.Add(GetParameter("@PayComponentDescription", SqlDbType.VarChar, thePayComponent.PayComponentDescription)); InsertCommand.Parameters.Add(GetParameter("@PayComponentType", SqlDbType.VarChar, thePayComponent.PayComponentType)); InsertCommand.Parameters.Add(GetParameter("@DisplayOrder", SqlDbType.Int, thePayComponent.DisplayOrder)); InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); InsertCommand.CommandText = "pHRM_PayComponents_Insert"; ExecuteStoredProcedure(InsertCommand); ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString()); return(ReturnValue); }
public static List <PayComponent> GetPayComponents(string searchText) { List <PayComponent> PayComponentList = new List <PayComponent>(); DataTable PayComponentTable = new DataTable(); PayComponentTable = PayComponentDataAccess.GetInstance.GetPayComponents(searchText); foreach (DataRow dr in PayComponentTable.Rows) { PayComponent ThePayComponent = new PayComponent(); ThePayComponent.PayComponentID = int.Parse(dr["PayComponentID"].ToString()); ThePayComponent.PayComponentDescription = dr["PayComponentDescription"].ToString(); ThePayComponent.PayComponentType = dr["PayComponentType"].ToString(); ThePayComponent.DisplayOrder = int.Parse(dr["DisplayOrder"].ToString()); PayComponentList.Add(ThePayComponent); } return(PayComponentList); }
public int DeletePayComponent(PayComponent thePayComponent) { return(PayComponentIntegration.DeletePayComponent(thePayComponent)); }
public int UpdatePayComponent(PayComponent thePayComponent) { return(PayComponentIntegration.UpdatePayComponent(thePayComponent)); }
public int InsertPayComponent(PayComponent thePayComponent) { return(PayComponentIntegration.InsertPayComponent(thePayComponent)); }
public static int DeletePayComponent(PayComponent thePayComponent) { return(PayComponentDataAccess.GetInstance.DeletePayCompenent(thePayComponent)); }
public static int InsertPayComponent(PayComponent thePayComponent) { return(PayComponentDataAccess.GetInstance.InsertPayComponent(thePayComponent)); }