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

Delete() public method

public Delete ( Gaurantee gaurantee ) : bool
gaurantee Gaurantee
return bool
        public bool Delete(Gaurantee gaurantee)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand command = db.GetStoredProcCommand("usp_GuaranteeDelete");

            db.AddInParameter(command, "@GuaranteeId", DbType.Int32, gaurantee.GuaranteeId);

            db.ExecuteNonQuery(command);

            return true;
        }