/// <summary> /// Update a OperationRole. /// </summary> public void Update(Model.OperationRole operationRole) { // // todo: add other logic here. // accessor.Update(operationRole); }
/// <summary> /// Insert a OperationRole. /// </summary> public void Insert(Model.OperationRole operationRole) { // // todo:add other logic here // accessor.Insert(operationRole); }
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; } } } }
public void Update(Model.OperationRole e) { this.Update <Model.OperationRole>(e); }
public void Insert(Model.OperationRole e) { this.Insert <Model.OperationRole>(e); }