Пример #1
0
 private void AddOperation(object sender, EventArgs e)
 {
     CtrlState                     = ControlState.New;
     _operationEntity              = new RBACOperation();
     _operationEntity.GroupKey     = this.operationTree.SelectedNode.Tag.ToString();
     _operationEntity.OperationKey = CommonUtils.GenerateNewKey(0);
 }
Пример #2
0
        private void BindDataToGridView()
        {
            RBACOperation entity  = new RBACOperation();
            DataSet       dataSet = new DataSet();

            entity.GroupKey = groupKey;
            dataSet         = entity.GetOperation();
            this.operationControl.DataSource = dataSet.Tables[0];
        }
Пример #3
0
        /// <summary>
        /// operation selected changed
        /// 下拉列表类型选择进行数据更新
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lueOperationGroup_EditValueChanged(object sender, EventArgs e)
        {
            RBACOperation operationEntity = new RBACOperation();

            operationEntity.GroupKey = lueOperationGroup.EditValue.ToString();
            operationGroupKey        = lueOperationGroup.EditValue.ToString();
            dataColumn = operationEntity.GetOperation();
            if (operationEntity.ErrorMsg == "")
            {
                CreateGridControl(dataRow, dataColumn);
            }
            else
            {
                MessageService.ShowError("${res:FanHai.Hemera.Addins.RBAC.DistributePrivilege.Msg.GetOperationError}");
            }
        }
Пример #4
0
        private void operationView_RowClick(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e)
        {
            if (e.RowHandle > -1)
            {
                CtrlState        = ControlState.Edit;
                _operationEntity = new RBACOperation();
                _operationEntity.OperationKey         = this.operationView.GetRowCellValue(e.RowHandle, Operation_Key).ToString();
                _operationEntity.OperationName        = this.operationView.GetRowCellValue(e.RowHandle, Operation_Name).ToString();
                _operationEntity.DisplayName          = this.operationView.GetRowCellValue(e.RowHandle, Display_Name).ToString();
                _operationEntity.OperationCode        = this.operationView.GetRowCellValue(e.RowHandle, Operation_Code).ToString();
                _operationEntity.Remark               = this.operationView.GetRowCellValue(e.RowHandle, Remark).ToString();
                _operationEntity.Editor               = this.operationView.GetRowCellValue(e.RowHandle, editor).ToString();
                _operationEntity.EditTimeZone         = this.operationView.GetRowCellValue(e.RowHandle, edit_timeZone).ToString();
                _operationEntity.IsInitializeFinished = true;

                this.txtOperationName.Text = _operationEntity.OperationName;
                this.txtDisplayName.Text   = _operationEntity.DisplayName;
                this.txtCode.Text          = _operationEntity.OperationCode;
                this.txtRemark.Text        = _operationEntity.Remark;
            }
        }