dojo.provide("parus.designerTemplateRoleAndUserAssignDialog");dojo.require("dijit.Dialog");dojo.require("dijit.form.Button");dojo.require("dijit.form.DateTextBox");dojo.require("parus.parus8");dojo.require("parus.dialog");dojo.require("parus.formats");dojo.require("parus.editDictionaryDialog");dojo.declare("parus.designerTemplateRoleAndUserAssignDialog",[parus.editDictionaryDialog],{onLoadParams:function(c,b,a){this.inherited(arguments);if(c&&b){this.userEdit.attr("value",c.getValue(b,"NAME"));this.roleEdit.attr("value",c.getValue(b,"ROLENAME"))}},roleChanged:function(){if(this.roleEdit.attr("value")){this.userEdit.attr("value","")}},userChanged:function(){if(this.userEdit.attr("value")){this.roleEdit.attr("value","")}},executeInsert:function(b){var a=parus.database.execute("designer.Template.RoleAndUserAssignment.Insert",{PRN:this.prn,USER_NAME:this.userEdit.attr("value"),ROLE_NAME:this.roleEdit.attr("value")});if(a){return parus.parus8.nodeField(parus.parus8.rowNodes(a)[0],"NRN")}},executeUpdate:function(){var a=parus.database.execute("designer.Template.RoleAndUserAssignment.Update",{RN:this.rn,USER_NAME:this.userEdit.attr("value"),ROLE_NAME:this.roleEdit.attr("value")});return !!a},executeDelete:function(c,b){var a=parus.database.execute("designer.Template.RoleAndUserAssignment.Delete",{RN:c.getValue(b,"RN")});return !!a}});