/* --------------------------------------------------------------------- ÀÔ°£ÆÇ Àü¹®ÀÇ Áø·áÀÏÁ¤¼öÁ¤ - Version : 1) : Ver.1.00.01 : Create By dhkim : 2009.09.16 ----------------------------------------------------------------------*/ var grdPath = "/root/main/signboardinfo/signboardinfolist"; /** * @group : * @ver : 2009.09.16 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : È­¸éÃʱâÈ­ * @param : * @param : * @return : * @--------------------------------------------------- */ function fInitialize(){ //¼¾ÅÍÀÎÁö ÀϹÝÁø·á°úÀÎÁö Á¶È¸ //ÀÔ°£ÆÇŸÀÌÆ² Á¶È¸ if(!submit('TRMNV99901')){ messageBox('¹®Á¦°¡ ¹ß»ýÇÏ¿© ŸÀÌÆ²Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E'); return false; } } /** * @group : * @ver : 2009.09.16 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤Á¶È¸ * @param : * @param : * @return : * @--------------------------------------------------- */ var ip; function fSearch(){ ip = model.getValue('/root/cond/ipaddr'); if(ip == null || ip == ''){ messageBox('Á¶È¸ÇÒ Áø·áÀÏÁ¤À» ¼±ÅÃÇϼ¼¿ä.', 'E'); return; } model.removenode('/root/send'); model.makeValue('/root/send/ipaddr', ip); model.removenode('/root/main/signboardinfo'); model.makeNode('/root/main/signboardinfo'); //Áø·áÀÏÁ¤Á¶È¸ if(!submit('TRMNV99902')){ messageBox('¹®Á¦°¡ ¹ß»ýÇÏ¿© Áø·áÀÏÁ¤Á¶È¸¸¦ ½ÇÆÐÇÏ¿´½À´Ï´Ù.', 'E'); return false; }else{ //¼±ÅÃÁø·á »ö º¯°æ for(var i = 1; i <= grd_scheinfo.rows;i++){ if(model.getValue(grdPath+"["+i+"]/choyn") == "Y"){ grd_scheinfo.cellstyle("background-color", i, 0, i, 14) = '#ccffff';//¼±ÅÃÁø·á }else{ grd_scheinfo.cellstyle("background-color", i, 0, i, 14) = '#ffffff'; } } } model.refresh(); } /** * @group : * @ver : 2009.09.18 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤Ãß°¡ * @param : * @param : * @return : * @--------------------------------------------------- */ function fAdd(){ grd_scheinfo.addRow(); model.setValue(grdPath + "[" + grd_scheinfo.row + "]/stat", 'i');//-:Á¶È¸, i:½Å±Ô, u:¼öÁ¤, d:»èÁ¦ model.setValue(grdPath + "[" + grd_scheinfo.row + "]/bgclr", '#FFFFFF');//±âº»¹è°æ»ö model.setValue(grdPath + "[" + grd_scheinfo.row + "]/ftface", '±¼¸²Ã¼');//±âº»±Û¾¾Ã¼ model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_supdeptnm", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_fieldnm", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_subdeptnm", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_drnm", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_amsche", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_pmsche", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fs_spclmednm", '10');//±âº»±Û¾¾Å©±â model.setValue(grdPath + "[" + grd_scheinfo.row + "]/choyn", 'N');//±âº»¼±ÅÃÁø·á¿©ºÎ model.setValue(grdPath + "[" + grd_scheinfo.row + "]/ipaddr", ip); //À­ÇàÀÇ °ú¸í, ¼¼ºÎºÐ¾ß, Áø·á°ú¸¦ ±âº» ¼¼ÆÃ if(grd_scheinfo.row > 1){ model.setValue(grdPath + "[" + grd_scheinfo.row + "]/supdeptnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/supdeptnm")); model.setValue(grdPath + "[" + grd_scheinfo.row + "]/fieldnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/fieldnm")); model.setValue(grdPath + "[" + grd_scheinfo.row + "]/subdeptnm", model.getValue(grdPath +"["+(grd_scheinfo.row-1)+"]/subdeptnm")); } grd_scheinfo.addStatus(grd_scheinfo.row, 'insert'); model.refresh(); } /** * @group : * @ver : 2010.03.26 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤»ðÀÔ * @param : * @param : * @return : * @--------------------------------------------------- */ function fInsert(){ var curRow = grd_scheinfo.row; if(curRow < 0){ messageBox("»ðÀÔÇÒ ÇàÀ» ¼±ÅÃÇϼ¼¿ä.", "E"); return; }else{ grd_scheinfo.insertRow(curRow); model.setValue(grdPath+"[" + curRow + "]/stat", 'i');//-:Á¶È¸, i:½Å±Ô, u:¼öÁ¤, d:»èÁ¦ grd_scheinfo.addStatus(curRow, 'insert'); } model.refresh(); grd_scheinfo.refresh(); } /** * @group : * @ver : 2009.09.18 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤»èÁ¦ * @param : * @param : * @return : * @--------------------------------------------------- */ function fDelete(){ //ÀúÀåµÇ¾îÀÖ´Â ÇàÀ̸é D·Î Ç¥½Ã, ½Å±ÔÇàÀÌ¸é ¹Ù·Î»èÁ¦ var curRow = grd_scheinfo.row; if(curRow < 0){ messageBox("»èÁ¦ÇÒ ÇàÀ» ¼±ÅÃÇϼ¼¿ä.", "E"); return; }else{ grd_scheinfo.deleteRow(curRow); /* var state = model.getValue(grdPath+"[" + curRow + "]/stat"); if(state == "i"){ grd_scheinfo.deleteRow(curRow); }else{ model.setValue(grdPath+"[" + curRow + "]/stat", 'd');//-:Á¶È¸, i:½Å±Ô, u:¼öÁ¤, d:»èÁ¦ grd_scheinfo.addStatus(curRow, 'delete'); } */ } model.refresh(); grd_scheinfo.refresh(); } /** * @group : * @ver : 2010.03.26 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤¼öÁ¤ * @param : * @param : * @return : * @--------------------------------------------------- */ function fModify(){ model.setValue(grdPath+"[" + grd_scheinfo.row + "]/stat", 'u');//-:Á¶È¸, i:½Å±Ô, u:¼öÁ¤, d:»èÁ¦ grd_scheinfo.addStatus(grd_scheinfo.row, 'update'); } /** * @group : * @ver : 2009.09.18 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : Áø·áÀÏÁ¤¼öÁ¤³»¿ª ÀúÀå * @param : * @param : * @return : * @--------------------------------------------------- */ function fSave(){ var sortseq=""; //ÀúÀåÀü sortseq ÀçÁ¤·Ä for(var i = 1; i < grd_scheinfo.rows; i++){ if(i < 9){ sortseq = "00"; }else if(i>9 && i<99){ sortseq = "0"; } model.setValue(grdPath+"[" + (i) + "]/sortseq", sortseq+i); } model.removenode('/root/send'); model.makeValue('/root/send/savedata', grd_scheinfo.getUpdateDataAll('i')); model.refresh(); if(submit('TXMNV99801')){ fSearch(); } } /** * @group : * @ver : 2010.03.26 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼±ÅÃÁø·á »ö±òÀû¿ë * @param : * @param : * @return : * @--------------------------------------------------- */ function fSetChoiceYn(choyn){ var cells = grd_scheinfo.selectedCells; //¼±ÅÃµÈ ½ìÀÇ ¹è¿­ var sRow, sCol, sColNm; //¼±ÅÃµÈ ½ìÀÇ row, col °ª, ¼±ÅÃµÈ colÀÇ Çʵå¸í for(var i = 0; i < cells.length; i++){ sRow = cells.item(i).row; sCol = cells.item(i).col; sColNm = grd_scheinfo.colAttribute(sCol, "ref"); //¼±ÅÃÁø·á¿©ºÎ°ª ¼¼ÆÃ model.setValue(grdPath+"[" + sRow + "]/choyn", choyn); //¼±ÅÃµÈ ½ìÀÇ Àüü Çà »ö»ó º¯°æ for(var j = 0; j <= 14; j++){ if(choyn == "Y"){ grd_scheinfo.cellStyle('background-color', sRow, j) = "#ccffff"; }else{ grd_scheinfo.cellStyle('background-color', sRow, j) = "#ffffff"; } } } //»öº¯°æÈÄ ¼±ÅÃ ÇØÁ¦ grd_scheinfo.row = 0; grd_scheinfo.col = 0; model.refresh(); } /** * @group : * @ver : 2010.04.01 * @by : dhkim * @--------------------------------------------------- * @type : function * @access : public * @desc : ¼±ÅÃµÈ ½ìÀÇ ±Û¾¾Å©±âº¯°æ * @param : * @param : * @return : * @--------------------------------------------------- */ function fSetFontSize(ftSize){ if(ftSize > 0){ var cells = grd_scheinfo.selectedCells; //¼±ÅÃµÈ ½ìÀÇ ¹è¿­ var sRow, sCol, sColNm; //¼±ÅÃµÈ ½ìÀÇ row, col °ª, ¼±ÅÃµÈ colÀÇ Çʵå¸í for(var i = 0; i < cells.length; i++){ sRow = cells.item(i).row; sCol = cells.item(i).col; sColNm = grd_scheinfo.colAttribute(sCol, "ref"); //¼±ÅÃµÈ ½ìÀÇ ±Û¾¾Å©±âº¯°æ(show) grd_scheinfo.cellStyle('font-size', sRow, sCol) = ftSize; //º¯°æµÈ ±Û¾¾Ã¼ °ªÀ» ³ëµå¿¡ ¼¼ÆÃ model.setValue(grdPath+"[" + sRow + "]/fs_"+sColNm, ftSize); } //±Û¾¾Å©±âº¯°æÈÄ ¼±ÅÃ ÇØÁ¦ grd_scheinfo.row = 0; grd_scheinfo.col = 0; //ÄÞº¸ °ª ÃʱâÈ­ model.setValue("/root/temp/fontinfo/size", ""); model.refresh(); grd_scheinfo.refresh(); }else{ messageBox("±Û¾¾Å©±â¸¦ ¼±ÅÃÇϼ¼¿ä.", "E"); } }