コード例 #1
0
 /// <summary>
 /// Update a OperationRole.
 /// </summary>
 public void Update(Model.OperationRole operationRole)
 {
     //
     // todo: add other logic here.
     //
     accessor.Update(operationRole);
 }
コード例 #2
0
 /// <summary>
 /// Insert a OperationRole.
 /// </summary>
 public void Insert(Model.OperationRole operationRole)
 {
     //
     // todo:add other logic here
     //
     accessor.Insert(operationRole);
 }
コード例 #3
0
 private void gridView1_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
 {
     this.gridView1.PostEditor();
     this.gridView1.UpdateCurrentRow();
     if ((bool)e.Value == true)
     {
         if (e.Column.Name == "gridColumn2")
         {
             Model.OperationRole         model = this.bindingSource1.Current as Model.OperationRole;
             IList <Model.OperationRole> list  = this.bindingSource1.DataSource as IList <Model.OperationRole>;
             if (list.Any(d => d.IsHold == true && model.PrimaryKey != d.PrimaryKey))
             {
                 MessageBox.Show("只能賦予一種角色", this.Text);
                 model.IsHold = false;
                 return;
             }
         }
     }
 }
コード例 #4
0
 public void Update(Model.OperationRole e)
 {
     this.Update <Model.OperationRole>(e);
 }
コード例 #5
0
 public void Insert(Model.OperationRole e)
 {
     this.Insert <Model.OperationRole>(e);
 }