Exemple #1
0
        /// <summary>
        /// Guarda en la bd el objeto actual
        /// </summary>
        protected override bool SaveObject()
        {
            this.Datos.RaiseListChangedEvents = false;

            InventarioAlmacen 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)
            {
                PgMng.ShowInfoException(ex);
                return(false);
            }
            finally
            {
                this.Datos.RaiseListChangedEvents = true;
            }
        }
Exemple #2
0
 public InventarioAlmacenAddForm(InventarioAlmacen source, Form parent)
     : base(-1, parent)
 {
     InitializeComponent();
     _entity = source.Clone();
     _entity.BeginEdit();
     SetFormData();
     _mf_type = ManagerFormType.MFAdd;
 }