dojo.provide("parus.designerCheckDialog");dojo.require("dijit.Dialog");dojo.require("dijit.form.Button");dojo.require("dijit.form.ValidationTextBox");dojo.require("dijit.form.SimpleTextarea");dojo.require("parus.parus8");dojo.require("parus.dialog");dojo.require("parus.dictEdit");dojo.require("parus.formats");dojo.require("parus.editableDictionaryDialog");dojo.require("parus.editDictionaryDialog");dojo.declare("parus.designerCheckDialog",[parus.editDictionaryDialog],{onLoadParams:function(c,b,a){this.inherited(arguments);if(c&&b){this.userProcEdit.attr("value",c.getValue(b,"FORMULA_CODE"));this.nameEdit.attr("value",c.getValue(b,"FORMULA_NAME"));this.levelSelect.attr("value",c.getValue(b,"ERROR_LEVEL"))}this.userProcEdit.onApplyDictionary=dojo.hitch(this,this.userProcChanged)},userProcChanged:function(a){if(a){this.nameEdit.attr("value",a.getFieldValue("NAME"))}else{if(!this.userProcEdit.showingDictionary&&!this.userProcEdit.attr("value")){this.nameEdit.attr("value","")}}},executeInsert:function(b){var a=parus.database.execute("designer.BalanceChecks.Insert",{PRN:this.prn,LEVEL:this.levelSelect.attr("value"),FORMULA_CODE:this.userProcEdit.attr("value")});if(a){return parus.parus8.nodeField(parus.parus8.rowNodes(a)[0],"NRN")}},executeUpdate:function(){var a=parus.database.execute("designer.BalanceChecks.Update",{RN:this.rn,LEVEL:this.levelSelect.attr("value"),FORMULA_CODE:this.userProcEdit.attr("value")});return !!a},executeDelete:function(b,a){parus.database.execute("designer.BalanceChecks.Delete",{RN:b.getValue(a,"RN")})}});