Пример #1
0
        private void buttonOK_Click(object sender, EventArgs e)
        {
            UseWaitCursor = true;
            Application.DoEvents();

            try
            {
                if (Power == null)
                    Power = new PowerInventory();

                if (this.txtTitle.Text.Trim() == "")
                {
                    CommonInvoke.MessageBox("标题不能为空!");
                    return;
                }

                Power.PowerName = this.txtTitle.Text.Trim();
                Power.PowerType = Convert.ToInt32(((EnforceForm.ComboBoxItemTextValue)(this.comboBox1.SelectedItem)).selectValue);
                Power.PowerNumber = this.txtNumber.Text;
                Power.PowerSubject = this.txtSubject.Text;
                Power.PowerContent = this.txtContent.Text;
                InvokeUtil.SystemService.EntityUpdate(Power);
                CommonInvoke.MessageBox("操作成功!");
                CloseWindow();
            }
            catch (Exception ex)
            {
                CommonInvoke.ErrorMessageBox(ex);
            }

            UseWaitCursor = false;
        }
Пример #2
0
 public frmPower(PowerInventory Power)
     : this()
 {
     this.Power = Power;
 }
Пример #3
0
 public PowerViewer(PowerInventory inventory)
     : this()
 {
     _inventory = inventory;
 }
Пример #4
0
 public PowerViewer(PowerInventory inventory, string module, object obj)
     : this(inventory)
 {
     _module = module;
     _object = obj;
 }
Пример #5
0
        /// <summary>
        /// 获取权力清单集合
        /// </summary>
        /// <param name="page">当前页</param>
        /// <param name="pageSize">显示记录数</param>
        /// <param name="Name">权力名称</param>
        /// <param name="PowerType">权力类型</param>
        /// <returns>实体集合</returns>
        public EList<PowerInventory> PowerGetAll(int page, int pageSize, string Name, int PowerType)
        {
            try
            {
                PowerInventory Obj = new PowerInventory();
                Obj.SystemService = this;
                return Obj.PowerGetAll(page, pageSize, Name, PowerType);

            }
            catch (Exception ex)
            {
                throw ex;
            }
        }