개발_참고하기/개발
넥사크로_배열, for문, set or get Column 사용법
정보 공유 블로그
2021. 5. 21. 15:59
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
//업체 구분값 조회
this.divTest_cusGb_onclick = function(obj:Button, e:nexacro.ClickEventInfo)
{
//배열 화면에 있는 업체코드 넣기
var cusArray = new Array();
for (var i = 0; i < this.testList.rowcount; i++) {
var cdValId = this.testList.getColumn(i, "cdValId");
cusArray.push(cdValId);
}
//배열에 넣은 화면 업체코드 위치를 찾아 구분값 세팅
for (var i = 0; i < this.testListGb.rowcount; i++) {
var cusCode = this.testListGb.getColumn(i, "cusCode");
var cusGb = this.testListGb.getColumn(i, "cusGb");
var cusLoc = cusArray.indexOf(cusCode);
this.testList.setColumn(cusLoc, "cusGb", cusGb);
}
//화면에서 구분값 확인후 0으로 세팅 ex)구분값:W -> C,7을 0으로 세팅
for (var i = 0; i < this.testListGb.rowcount; i++) {
var cusCode = this.testListGb.getColumn(i, "cusCode");
var cusLoc = cusArray.indexOf(cusCode);
var cusGb = this.testList.getColumn(cusLoc, "cusGb");
if(cusGb == "W"){
this.testList.setColumn(cusLoc, "cbRoScnCdC", "0");
this.testList.setColumn(cusLoc, "cbRoScnCd7", "0");
} else if(cusGb == "WC"){
this.testList.setColumn(cusLoc, "cbRoScnCd7", "0");
} else if(cusGb == "C"){
this.testList.setColumn(cusLoc, "cbRoScnCdW", "0");
this.testList.setColumn(cusLoc, "cbRoScnCd7", "0");
} else if(cusGb == "7"){
this.testList.setColumn(cusLoc, "cbRoScnCdW", "0");
this.testList.setColumn(cusLoc, "cbRoScnCdC", "0");
}
}
}
|
cs |