public ArticuloView(object id) : base(WindowType.Toplevel) { //this.id = id; articulo = ArticuloPersister.Load(id); init(); insert(); saveAction.Activated += delegate { update(); }; }
//Si hay que actualizar el articulo public ArticuloView(object id) : base(WindowType.Toplevel) { articulo = ArticuloPersister.Load(id); init(); //Versión anterior de update /* * foreach (var fila in queryResultArt.Rows) { * entryNombre.Text = fila [1].ToString (); * QueryResult queryResultCat = PersisterHelper.Get ("select * from categoria"); * ComboBoxHelper.Fill (comboBoxCategoria, queryResultCat); * comboBoxCategoria.Active = Int32.Parse(fila [2].ToString()); * spinButtonPrecio.Text =fila [3].ToString(); * spinButtonPrecio.Activate(); * * }*/ saveAction.Activated += delegate { updateArt(id); }; }
public ArticuloView(object id) : base(WindowType.Toplevel) { articulo = ArticuloPersister.Load(id); init(); save = ArticuloPersister.Update; }
public ArticuloView(object id) : base(Gtk.WindowType.Toplevel) { articulo = ArticuloPersister.Load(id); init(); saveAction.Activated += delegate { update(); } }