while select * from custTrans where custTrans.CompanyBankAccountId == bankAccountTable.AccountId
{
if(custTrans.Voucher == bankAccountTrans.Voucher)
{
cell = null;
cell = cells.get_Item(currentRow, 3);
cell.set_Value(custTrans.AccountNum);
cell = null;
cell = cells.get_Item(currentRow, 4);
cell.set_Value(custTrans.custTableName());
cell = null;
cell = cells.get_Item(currentRow, 5);
cell.set_Value(Global::OAIGetDimensionDisplayValue(custTable.DefaultDimension,"@OAB:OABBusinessUnitnew"));
cell = null;
cell = cells.get_Item(currentRow, 6);
cell.set_Value(custTable.InventLocation );
cell = null;
cell = cells.get_Item(currentRow, 7);
cell.set_Value(enum2Str(custTrans.TransType));
}
}
please help me convert this piece of code into a method.Thankyouu !!