dataset onLoadComplete (예제) 카테고리 없음2010. 10. 27. 16:44
function ds_PickupDetail_OnLoadCompleted(obj,nErrorCode,strErrorMsg,nReason)
{
if(ds_PickupDetail.rowcount == 0)
return;
var cCellTextLength ;
var i,j;
var tempGetColumn = "";
var ColCount = obj.ColCount();
//Column Data 출력
if( obj.currow != -1 )
{
i = obj.currow;
for (j=0; j < ColCount; j++)
{
tempGetColumn = obj.GetColID(j);
if(tempGetColumn == "PICKUP_TEL_NO" || tempGetColumn == "PICKUP_FAX_NO"
|| tempGetColumn == "DLVRY_TEL_NO" || tempGetColumn == "DLVRY_FAX_NO")
{
cCellTextLength = length(replace(obj.getColumn(i,tempGetColumn),"-",""));
if(cCellTextLength = 10 ) // 123 456 7890
{
if(tempGetColumn == "PICKUP_TEL_NO")
div_main.edt_pickup_tel_no.Mask = "###-###-####";
else if(tempGetColumn == "PICKUP_FAX_NO")
div_main.edt_pickup_fax_no.Mask = "###-###-####";
else if(tempGetColumn == "DLVRY_TEL_NO")
div_main.edt_dlvry_tel_no.Mask = "###-###-####";
else if(tempGetColumn == "DLVRY_FAX_NO")
div_main.edt_dlvry_fax_no.Mask = "###-###-####";
} else if(cCellTextLength = 11 ) // 123 4567 8901
{
if(tempGetColumn == "PICKUP_TEL_NO")
div_main.edt_pickup_tel_no.Mask = "###-####-####";
else if(tempGetColumn == "PICKUP_FAX_NO")
div_main.edt_pickup_fax_no.Mask = "###-####-####";
else if(tempGetColumn == "DLVRY_TEL_NO")
div_main.edt_dlvry_tel_no.Mask = "###-####-####";
else if(tempGetColumn == "DLVRY_FAX_NO")
div_main.edt_dlvry_fax_no.Mask = "###-####-####";
}
}
}
}
}