Tuesday, December 29, 2009

Why is my Ayinde query analyzer not working.

Take a close look at schema. May be the correct schema name is missing in the mapping file.

Tuesday, November 24, 2009

Infragistics recursive line looping and checking check boxes.


function WaiveAllRows(grid, rows) {
for (var k = 0; k < rows.length; k++) {

var childRow;
var tempRow = rows[k];
if (tempRow == null)
childRow = rows.getRow(k);
else
childRow = igtbl_getRowById(tempRow.id);
if (childRow != null) {
var childCell = childRow.getCellFromKey('Waive');
if (childCell != null) {
var waiveCheckBoxValue = childCell.getValue();
if (waiveCheckBoxValue == "false") {
//Set the event to true, so the any other dependent changes can be made.
//Example: Setting waive check box will grey out the Request NRC
childCell.setValue("true", true);
}
}
if (childRow.ChildRowsCount > 0) {
WaiveAllRows(grid, childRow.getChildRows());
}
}
}
}

function lnkICBLineItemWaiveAll_Click() {
var gridId = '<% =uwgICBLineItems.ClientID %>';
var grid = igtbl_getGridById(gridId);
var rows = grid.Rows;
if (grid.Rows.length > 0) {
WaiveAllRows(grid, grid.Rows);
}
return false;
}

Thursday, May 21, 2009

How to with cursor

DECLARE
rowiden varchar2(15);
inc number;
CURSOR c1
IS
select lov0_.ROW_ID as ROW1_17_
from sebl_dev.S_LST_OF_VAL lov0_
where (lov0_.TYPE in ('UT_MARKET_TYPE'))
and (lov0_.ACTIVE_FLG = 'Y')
order by lov0_.NAME, lov0_.ORDER_BY asc;

BEGIN
rowiden := null;
inc := 0;

open c1;
loop
fetch c1 into rowiden;
exit when c1%notfound;
inc := inc + 1;
-- Danger.. make sure the proper id is given.
update sebl_dev.S_LST_OF_VAL set order_by = inc where row_id = rowiden ;
end loop;

close c1;
COMMIT;
END;