/// <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; Despachante temp = _entity.Clone(); temp.ApplyEdit(); // do the save try { _entity = temp.Save(); _entity.ApplyEdit(); //Decomentar si se va a mantener en memoria //_entity.BeginEdit(); return(true); } catch (Exception ex) { MessageBox.Show(iQExceptionHandler.GetAllMessages(ex), Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.Exclamation); return(false); } finally { this.Datos.RaiseListChangedEvents = true; } } }
public DespachanteAddForm(Despachante source, Form parent) : base(-1, parent) { InitializeComponent(); _entity = source.Clone(); _entity.BeginEdit(); SetFormData(); _mf_type = ManagerFormType.MFAdd; }