![]() |
![]() |
Web Design Information |
|
![]() |
![]() |
Custom Hooks in TierDeveloperAnn 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 actions. 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 UpdateCustomerInfoCustomers objInfo { try { ... ... .... ....... ... ... .... ....... CustomersHooks hooks = new CustomersHooks; status = hooks.PreUpdateCustomerInfoSystem.Data.SqlClient.SqlConnectiongetConnection, objInfo; if status != CustomersHooks.SUCCESS_CONTINUE { SetStatusstatus == 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.PostUpdateCustomerInfoSystem.Data.SqlClient.SqlConnectiongetConnection, objInfo; if status != CustomersHooks.SUCCESS_CONTINUE { ... ... .... ....... ... ... .... ....... return; } SetStatusEStatus.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; } }
| ![]() | ![]() | ![]() | RELATED ARTICLES Do You Really Need A Website Having a website is the one form of marketing your business that just keeps on giving! But how do you know if you need a website Should you Purchase a Turnkey Site or Build Your Own You see them all the time, pre-packaged websites selling everything from acorns to zinc. Most of them have a nice professional look about them, with good pictures and graphics. Of course, the sales literature with the offer telling you how youre going to make a gazillion dollars! Web Hosting: Shared or Dedicated - Which Should You Choose Before you begin your search for a web host you should first determine whether you need shared web hosting or dedicated web hosting. Beautiful Web Sites Seldom Make More Sales Designing an E-commerce Web site is not as simple as having a "pretty" site that is a pleasure to visit. While it is important to have an attractive site, as much thought must be given to functionality as to appearance. Colors for Your Website Oh Yes ..Colors! There are hot ones, cool ones, earthy colors, spiritual colors and every other shade in the rainbow! What colors should you use for your website Can They Use Your Website In A TV Broadcast About Scams When you designed your website, you probably dreamt about how wonderful it would be if one day a popular TV program featured it, and you would become famous overnight, and make lots of $$$. How Much Does A Website Cost To receive a complementary consultation and free quote for your website project, complete our project survey form located here. The Benefits Of Outsourcing The year 2005 is expected to be the year of "outsourcing". Why You Need A Web Site "I have a small business with just a couple of employees and I don’t think my product can really be sold online. Do I need a web site" The Top 20 Web Mistakes Small Businesses Make My parents made a monster. Little did they know 30 years ago that they would get exactly what they wished for. Like W.W. Jacobs tale of "The Monkeys Paw", they got what they wanted, for better and maybe even for worse. Boost your Application Development “Reduce Time Intensive Phases during Software Development with TierDeveloper” Web Accessibility: The Basics What is web accessibility & why is it important The Reality of Successful Web Site Today For a number of reasons, the analysis of customers feedback is too often given little attention. Still, people who ignore research are as dangerous as generals who ignore decodes of enemy signals c David Ogilvy. Its an inexcusable omission for those, who strive for having a successful web site. There are dozens of ways to receive feedback and unlimited ideas for your customer service improvement in it. But you cant afford phone everybody from your CRM list or correspond with each customer via email or regular mail. It will flatter them but bother you. Fortunately there is such a magic tool as web-based forms, which allow site owners to automate the process and to use the received data in your analysis; the analysis, aimed at your web site usability optimizing. Traditional businesses on the Internet Have you ever thought of putting your business on the Internet, but simply not known where to start or youre not sure whether the Internet is really meant for your business Are You Driving Away Potential Customers When a prospect lands on your website will he or she understand what you are presenting Do your ordering/sign up instructions make sense Can prospects easily find the information they are searching for If you don’t know the answers to these questions you may be driving away potential customers. Protecting Your Business From Spam Even being as careful as possible with my email address, I still used to receive more than 100 email messages a day, which is no exaggeration. Only about 10% of those emails were from people that I knew and the rest of the messages were unwanted email…”spam”. And I’m sure you can relate to my frustration. It is estimated that over seventy-six billion unwanted email messages were delivered in 2003, costing companies more than $10 billion each year. Blogging for Profits Bloging the act of writing to a blog has become one of the fastest growing trends this year and many internet gurus believe that this is the new biggest trend.Well, you might ask yourself what is the big deal I dont even know what a blog is The DRC Blew It The DRC Disability Rights Commission recently announced the results of their year-long investigation into the accessibility of 1000 websites. The DRCs report http://www.drc-gb.org/publicationsandreports/2.pdf concluded that most websites are highly inaccessible, with over 81% not even meeting basic standards of accessibility. Website Theft - Part 2 of 3 ~ How do I know if my website material has been stolen and what do I do if it has Please note that some of the information included in this article has been quoted from various locations while other information is simply my personal opinion and you will probably feel my passion in my words. Design vs Content: Who is KING Well it is not Elvis, thats for sure. ![]() |
home | site map |
© 2005 |