dojo.provide("parus.designerIndexFormulaDialog");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.require("parus.designerRecalculateTypeDialog");dojo.declare("parus.designerIndexFormulaDialog",[parus.editDictionaryDialog],{onLoadParams:function(c,b,a){this.inherited(arguments);if(c&&b){this.recalculateTypeEdit.attr("value",c.getValue(b,"RECALCTYPE"));this.userProcEdit.attr("value",c.getValue(b,"USERPROC"));this.dateFromEdit.attr("value",parus.formats.stringToDate(c.getValue(b,"BEGINDATE")));this.dateToEdit.attr("value",parus.formats.stringToDate(c.getValue(b,"ENDDATE")))}},executeInsert:function(){var a=parus.database.execute("designer.BalanceIndexes.Formulas.Insert",{PRN:this.prn,RECALCTYPE:this.recalculateTypeEdit.attr("value"),USERPROC:this.userProcEdit.attr("value"),BEGINDATE:parus.formats.dateToString(this.dateFromEdit.attr("value")),ENDDATE:parus.formats.dateToString(this.dateToEdit.attr("value"))});if(a){return parus.parus8.nodeField(parus.parus8.rowNodes(a)[0],"NRN")}},executeUpdate:function(){var a=parus.database.execute("designer.BalanceIndexes.Formulas.Update",{RN:this.rn,RECALCTYPE:this.recalculateTypeEdit.attr("value"),USERPROC:this.userProcEdit.attr("value"),BEGINDATE:parus.formats.dateToString(this.dateFromEdit.attr("value")),ENDDATE:parus.formats.dateToString(this.dateToEdit.attr("value"))});return !!a},executeDelete:function(c,b){var a=parus.database.execute("designer.BalanceIndexes.Formulas.Delete",{RN:c.getValue(b,"RN")});return !!a}});