var mGrid = Ext.getCmp('regionMainGrid').getSelectionModel(); if (mGrid.hasSelection()) { var record = mGrid.getLastSelected(); Ext.Ajax.request({ url: '/BscRegion/HasChildren', params: record.data, success: function (form, action) { var successfully = Ext.decode(form.responseText).success; if (successfully) { Ext.MessageBox.down('#yes').setText('是?'); // 修T改?弹獭出?消?息¢提示?框ò的?按恪钮¥的?默?认?文?字? Ext.MessageBox.down('#no').setText('否?'); Ext.MessageBox.show({ title: this.msgTitle, msg: '数簓据Y删?除y之?后ó无T法ぁ恢?复′,?是?否?确ā定¨删?除y??', buttons: Ext.Msg.YESNO, icon: Ext.Msg.QUESTION, fn: this.onDeleteConfirm, scope: this }); } else { Ext.Msg.alert("提示?", Ext.decode(form.responseText).msg + ",不?能ü删?除y!"); } }, failure: function (form, action) { Ext.Msg.alert("提示?", "操ù作痢失骸败悒?"); }, scope: this }); } else { Ext.Msg.alert('提示?', '请?选?择?要癮删?除y的?数簓据Y!?'); }-------------------------------------------------------------------------------------------mvc:----------------------------------------------------------------------------------------------------------------------------------------- ////// 是?否?有瓺子哩节ú点? /// /// ///public string HasChildren(Region mRegion) { string mReturnStr = string.Empty; Region mConditions; IList mRegions = new List (); if (mRegion != null) { mConditions = new Region(); mConditions.pId = mRegion.id; mRegions = RegionSrv.SelectByFields(mConditions); } if (mRegions.Count > 0) { return mReturnStr = @"{ success: false, msg: '有瓺子哩节ú点?'}"; } return mReturnStr = @"{ success: true}"; }