`
qoz790qo
  • 浏览: 14977 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

workplan

 
阅读更多

workplan
2011年04月18日
  ///
  //var LimitsStore;
  //var UserInfoForm
  WorkplanManage = function (node) {
  var b = false;
  //    -------------------------定义LimitsGrid---------------------------
  var ViewGrid = new Ext.Panel({
  id: 'detailPanel',
  style: 'margin-top:5px;border-top: 1 #a3bad9 solid;',
  region: 'center',
  html: '选择一条记录,这里将显示详细信息!',
  //超过长度带自动滚动条
  tbar: [{
  iconCls: 'icon-user-limits',
  text: '赋予权限',
  tooltip: "添加赋予权限"
  }, {
  iconCls: 'icon-user-delete',
  text: '从值权限',
  tooltip: "清空赋予权限"
  }],
  border: false
  });
  var SelectGrid = new Ext.Panel({
  id: 'SelectGrid',
  //        cm: cm,
  bodyStyle: "border-bottom: 1 #a3bad9 solid;",
  height: 100,
  //        split: true,
  region: 'north',
  border: false
  });
  var MainPanel = new Ext.Panel({
  id: 'mian-view',
  autoWidth: true,
  aotoHeight: true,
  layout: 'border',
  border: false,
  items: [
  SelectGrid,
  ViewGrid
  ]
  });
  GridMain(node, MainPanel, "roomtypeicon");
  };
  //连接数据库
  function UserLimitsFn() {
  var userid = Ext.getCmp("userid").getValue();
  if (Ext.util.Format.trim(userid) == "") {
  Ext.Msg.alert("警告", "请选择赋予权限的用户!");
  return;
  }
  Ext.Ajax.request
  ({
  url: "Router/SysUserManages/InitLimits.aspx", //请求的地址
  params: { ParamValue: "1", ParamUserId: userid }, //发送的参数
  success: function (response, option) {
  var obj = Ext.util.JSON.decode(response.responseText);
  //返回的信息
  if (obj.success == true) {
  LimitsStore.reload();
  }
  else {
  Ext.Msg.alert("坏消息", "坏消息:赋予权限失败了!");
  }
  },
  failure: function () {
  Ext.Msg.alert("坏消息", "坏消息:赋予权限出现异常了!");
  }
  });
  }
  //function loadForm(comboBox) {
  //    var username = comboBox.getRawValue();
  //    UserInfoForm.form.load({
  //        waitMsg: '正在加载数据请稍后', //提示信息
  //        waitTitle: '提示', //标题
  //        url: 'Data/EmployeeInfo/GetEmployeeInfo.aspx', //请求的url地址
  //        params: { ID: username },
  //        method: 'GET', //请求方式
  //        success: function (form, action) {//加载成功的处理函数
  //            //Ext.Msg.alert('提示','数据加载成功');
  //        },
  //        failure: function (form, action) {//加载失败的处理函数
  //            Ext.Msg.alert('提示', '数据加载失败');
  //        }
  //    });
  //}
  //连接数据库
  function AddLimitsFn() {
  var userid = Ext.getCmp("userid").getValue();
  if (Ext.util.Format.trim(userid) == "") {
  Ext.Msg.alert("警告", "请选择赋予权限的用户!");
  return;
  }
  Ext.Ajax.request
  ({
  url: "Router/SysUserManages/LimitsManages.aspx", //请求的地址
  params: { ParamValue: "1", ParamUserId: userid }, //发送的参数
  success: function (response, option) {
  var obj = Ext.util.JSON.decode(response.responseText);
  //返回的信息
  if (obj.success == true) {
  Ext.Msg.alert("好消息", "好消息:赋予权限成功!");
  }
  else {
  Ext.Msg.alert("坏消息", "坏消息:赋予权限失败了!");
  }
  },
  failure: function () {
  Ext.Msg.alert("坏消息", "坏消息:赋予权限出现异常了!");
  }
  });
  }
  //连接数据库
  function DelLimitsFn() {
  Ext.Ajax.request
  ({
  url: "Router/SysUserManages/DefaultLimits.aspx", //请求的地址
  success: function (response, option) {
  var obj = Ext.util.JSON.decode(response.responseText);
  //返回的信息
  if (obj.success == true) {
  LimitsStore.reload();
  Ext.Msg.alert("好消息", "好消息:还原权限成功!");
  }
  else {
  Ext.Msg.alert("坏消息", "坏消息:还原权限失败了!");
  }
  },
  failure: function () {
  Ext.Msg.alert("坏消息", "坏消息:还原权限出现异常了!");
  }
  });
  }
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics