public static PayCategory GetPayCategoryById(int recordId) { DataRow PayCategoryRow = PayCategoryDataAccess.GetInstance.GetPayCategoryById(recordId); PayCategory ThePayCategory = new PayCategory(); ThePayCategory.PayCategoryID = int.Parse(PayCategoryRow["PayCategoryID"].ToString()); ThePayCategory.PayCategoryDescription = PayCategoryRow["PayCategoryDescription"].ToString(); ThePayCategory.IsActive = bool.Parse(PayCategoryRow["IsActive"].ToString()); return(ThePayCategory); }
public int DeletePayCategory(PayCategory thePayCategory) { 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("@PayCategoryID", SqlDbType.Int, thePayCategory.PayCategoryID)); DeleteCommand.CommandText = "pHRM_PayCategories_Delete"; ExecuteStoredProcedure(DeleteCommand); ReturnValue = int.Parse(DeleteCommand.Parameters[0].Value.ToString()); return(ReturnValue); }
public int InsertPayCategory(PayCategory thePayCategory) { 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("@PayCategoryDescription", SqlDbType.VarChar, thePayCategory.PayCategoryDescription)); InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); InsertCommand.CommandText = "pHRM_PayCategories_Insert"; ExecuteStoredProcedure(InsertCommand); ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString()); return(ReturnValue); }
public int UpdatePayCategory(PayCategory thePayCategory) { int ReturnValue = 0; SqlCommand UpdateCommand = new SqlCommand(); UpdateCommand.CommandType = CommandType.StoredProcedure; UpdateCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output; UpdateCommand.Parameters.Add(GetParameter("@PayCategoryID", SqlDbType.Int, thePayCategory.PayCategoryID)); UpdateCommand.Parameters.Add(GetParameter("@PayCategoryDescription", SqlDbType.VarChar, thePayCategory.PayCategoryDescription)); UpdateCommand.Parameters.Add(GetParameter("@IsActive", SqlDbType.Bit, thePayCategory.IsActive)); UpdateCommand.Parameters.Add(GetParameter("@ModifiedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID)); UpdateCommand.CommandText = "pHRM_PayCategories_Update"; ExecuteStoredProcedure(UpdateCommand); ReturnValue = int.Parse(UpdateCommand.Parameters[0].Value.ToString()); return(ReturnValue); }
public static List <PayCategory> GetPayCategories(string searchText) { List <PayCategory> PayCategoryList = new List <PayCategory>(); DataTable PayCategoryTable = new DataTable(); PayCategoryTable = PayCategoryDataAccess.GetInstance.GetPayCategories(searchText); foreach (DataRow dr in PayCategoryTable.Rows) { PayCategory ThePayCategory = new PayCategory(); ThePayCategory.PayCategoryID = int.Parse(dr["PayCategoryID"].ToString()); ThePayCategory.PayCategoryDescription = dr["PayCategoryDescription"].ToString(); PayCategoryList.Add(ThePayCategory); } return(PayCategoryList); }
public int DeletePayCategory(PayCategory thePayCategory) { return(PayCategoryIntegration.DeletePayCategory(thePayCategory)); }
public int UpdatePayCategory(PayCategory thePayCategory) { return(PayCategoryIntegration.UpdatePayCategory(thePayCategory)); }
public int InsertPayCategory(PayCategory thePayCategory) { return(PayCategoryIntegration.InsertPayCategory(thePayCategory)); }
public static int DeletePayCategory(PayCategory thePayCategory) { return(PayCategoryDataAccess.GetInstance.DeletePayCategory(thePayCategory)); }
public static int InsertPayCategory(PayCategory thePayCategory) { return(PayCategoryDataAccess.GetInstance.InsertPayCategory(thePayCategory)); }