Everything you wanted to know about parking but were too shy to ask . . . . . .

       



 
About Parking :
 
» HOME
» Domain Parking
» Auto And Trucks

» Business And Finance

» Computers And Internet

» Education

» Family

» Food And Drink

» Gadgets And Gizmos

» Health

» Hobbies

» Home Improvement

» Humor

» Kids And Teens

» Legal

» Marketing

» Men

» Music And Movies

» Online Business

» Parenting

» Pets And Animals

» Politics And Government

» Recreation And Sports

» Relationships

» Religion

» Self Improvement

» Site Promotion

» Travel And Leisure

» Web Design

» Women

» Writing

»
»
» Random Quotes
» Best Websites
 
Great Websites :
 

Aesop’s Fables

Fun & Games

Advertise Here

Amusement

Best Baby Names

Christmas Jokes

College Humor

Complete Nonsense

Fairy Tales

Famous Poems

Famous Quotes

Flowers

Framed Posters

Free Diet Plans

Free Song Lyrics

Free View Webcams

Friendship Quotes

Funny Cat Pictures

Funny Cats

Funny Jokes

Funny Jokes Online

Funny Pictures

Funny Poems

Funny Quotes

Ghosts

Ghost Pictures

Ghost Stories

Glaswegian

Healthy Recipes

Humorous Scripts

Humor Posters

Inspirational Poems

Insult Generator

Jokes

Knock Knock Jokes

Lighthouses

Limerick Poems

Limericks

Love Poems

Fantasy Books

Mockery

Model Posters

Movie Posters

Names Meanings

Rabbie Burns

Not Mensa

Parking

Photographs

Poet

Poker Articles

Posters

Quotations Online

Random Words

Riddles

Riddles Online

Odd Jokes

Spam

Sports Posters

Duck Webcam

Strange Laws

Stupid Laws

Tongue Twisters

Top 100 Baby Names

Trophies

Vodka

Webmaster Articles

Weird Animals

Weird Facts

Weird Websites

Weird

Whisky

Wine

Work From Home

Worst City

Worst Jokes

Worst Killers

 
 
 
 
 
Parking.gs
 

Facts and Articles on Parking and Other Interesting Topics

TOPIC: Web Design And Development

TITLE: Custom Hooks in TierDeveloper

Article:

Custom Hooks in TierDeveloper by: Ann Morris

Custom Hooks is another powerful and most demanding feature provided by TierDeveloper. Custom Hooks work like database triggers. It could be your own business logic that you can activate before or after performing some database action(s). PreHooks and PostHooks are two ways, provided by TierDeveloper, through which you can embed your own logic in the generated code. Pre hook methods are called before the database access is performed whereas post hook methods are called after the database operations are performed.

Custom hooks can be specified wherever database access is performed. It includes standard operations, query methods, bulk operations and custom operations. User can generate skeleton code for custom hooks of the selected methods or he/she can use his/her own hooks class.

For your convenience and better understanding I have listed sample code here which shows how TierDeveloper embed custom hooks in the generated code. It is pretty self-explanatory.

public void UpdateCustomerInfo(Customers objInfo)

{

try

{

... ... .... .......

... ... .... .......

CustomersHooks hooks = new CustomersHooks();

status = hooks.PreUpdateCustomerInfo((System.Data.SqlClient.SqlConnection)getConnection(), objInfo);

if (status != CustomersHooks.SUCCESS_CONTINUE)

{

SetStatus(status == CustomersHooks.FAIL_NONCONTINUE ? EStatus.eFail : EStatus.eSuccess);

ReleaseCommand();

return;

}

AddCmdParameter('@CompanyName', TDevFramework.EDataType.eVarchar, objInfo.CompanyName, TDevFramework.EParamDirection.eInput, objInfo.IsNull('CompanyName'));

... ... .... .......

... ... .... .......

... ... .... .......

ExecuteNonQuery();

status = hooks.PostUpdateCustomerInfo((System.Data.SqlClient.SqlConnection)getConnection(), objInfo);

if (status != CustomersHooks.SUCCESS_CONTINUE)

{

... ... .... .......

... ... .... .......

return;

}

SetStatus(EStatus.eSuccess);

ReleaseCommand();

}

catch (Exception e)

{

... ... .... .......

... ... .... .......

throw e;

}

}

public class CustomersHooks

{

public const int SUCCESS_CONTINUE = 0;

public const int SUCCESS_NONCONTINUE = 1;

public const int FAIL_NONCONTINUE = 2;

public int PreUpdateCustomerInfo( System.Data.SqlClient.SqlConnection Conn, Customers objInfo)

{

//.. .. .. . .. ..

// . .. .. .. .. Put your own code here

return SUCCESS_CONTINUE;

}

public int PostUpdateCustomerInfo( System.Data.SqlClient.SqlConnection Conn, Customers objInfo)

{

// .. .. .. .. . .. .. ..

// .. .. .. .. put your own code here.

return SUCCESS_CONTINUE;

}

}

About The Author

Ann Morris - I work in a software development Organization and interested in writing technical articles.

ann@alachisoft.com

This article was posted on January '07

<-- Previous     |     Next -->

 

If you found "Custom Hooks in TierDeveloper" interesting then check out our other :

Parking Facts and Other Articles

 
Parking.gs
 
 
 
Interesting :
 

 
 
   
 
© Website Design Copyright 2009 by Parking.gs