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

Delete() public method

public Delete ( Company company ) : bool
company Company
return bool
        public bool Delete(Company company)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_CompanyDelete");
            db.AddInParameter(command, "@CompanyId", DbType.Int32, company.CompanyId);

            db.ExecuteNonQuery(command);

            return true;
        }