public SerieUIForm(moleQule.Serie.Serie Serie) : base() { InitializeComponent(); _entity = Serie.Clone(); _entity.BeginEdit(); SetFormData(); }
/// <summary> /// Guarda en la bd el objeto actual /// </summary> protected override bool SaveObject() { using (StatusBusy busy = new StatusBusy(moleQule.Face.Resources.Messages.SAVING)) { this.Datos.RaiseListChangedEvents = false; moleQule.Serie.Serie temp = _entity.Clone(); temp.ApplyEdit(); // do the save try { _entity = temp.Save(); _entity.ApplyEdit(); return(true); } catch (iQValidationException ex) { MessageBox.Show(iQExceptionHandler.GetAllMessages(ex) + Environment.NewLine + ex.SysMessage, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } catch (Exception ex) { MessageBox.Show(moleQule.Face.Resources.Messages.OPERATION_ERROR + Environment.NewLine + ex.Message, Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } finally { this.Datos.RaiseListChangedEvents = true; } } }
protected override void GetFormSourceData(long oid) { _entity = moleQule.Serie.Serie.Get(oid); _entity.BeginEdit(); }