HBM.GeneralManagement.DepartmentsDAO.Delete C# (CSharp) Method

Delete() public method

public Delete ( Department department ) : bool
department Department
return bool
        public bool Delete(Department department)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_DepartmentDelete");

            db.AddInParameter(command, "@DepartmentId", DbType.Int32, department.DepartmentId);

            db.ExecuteNonQuery(command);

            return true;
        }