Wednesday, 2 November 2016





Get item name using item id (using active mathod and display mathod)

Today i am using active mathod to store item name in database table using display mathod.

Step1 . create table and take 2 string control one for itemid and second form itemname

Step 2. Write mathod in table mathod dispaly mathod name itemname

display itemname itemname()
{
inventtable inventtable;
;
return inventtable::find(this.ItemId).ItemName;
}

Step3. Now create form take both control and in itemid control datasource new table and datamathod name this display mathod itemname().
By this now when you select itemid , you will select itemname. But by this you will not see itemname in table.

For that

Step4. Form -> datasource mathod -> overwrite active mathod and write this code.

public int active()
{
   int ret;

   ret = super();
   
   RackInqueryTable.itemname = rackinquerytable.itemname();

   return ret;
}


Now you will see change in form and table too.



Thanks


Akshay

No comments:

Post a Comment