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