private void EditCommutatorType(int CommutatorTypeId) { this.CommutatorType = this.srvCommutatorType.GetById(CommutatorTypeId); this.ClearDetailControls(); this.LoadFormFromEntity(); this.frmCommutatorType.HiddenDetail(false); this.ShowDetail(true); }
public override CommutatorType GetSearchResult() { CommutatorType CommutatorType = null; UltraGridRow activeRow = this.grdSchSearch.ActiveRow; if (activeRow != null) { int CommutatorTypeId = Convert.ToInt32(activeRow.Cells[0].Value); CommutatorType = this.srvCommutatorType.GetById(CommutatorTypeId); } return(CommutatorType); }
private void DeleteEntity(int CommutatorTypeId) { if (MessageBox.Show("¿Esta seguro de eliminar el Tipo de Conmutador?", "Advertencia", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK) { return; } this.CommutatorType = this.srvCommutatorType.GetById(CommutatorTypeId); this.CommutatorType.Activated = false; this.CommutatorType.Deleted = true; this.srvCommutatorType.SaveOrUpdate(this.CommutatorType); this.Search(); }
private void btnSchCreate_Click(object sender, EventArgs e) { this.CommutatorType = new CommutatorType(); this.ClearDetailControls(); this.ShowDetail(true); }