protected void add_cat() { try { get_tag_control(cmb_categorie).reloading = true; // chiedo il nome string title = frm_popup.popup_input("Nuova Categoria Spese", "Inserisci il titolo della categoria", main, "Nuova Categoria"); if (string.IsNullOrEmpty(title)) { return; } cat_spesa cs = cat_spesa.dl.ins_cat_spesa(logged.utente(), title); object prev = cmb_categorie.SelectedValue; refresh_cats_spesa(); if (prev != null) { cmb_categorie.SelectedValue = prev; } else { cmb_categorie.SelectedIndex = -1; } } catch (Exception ex) { main.set_status_err(ex); } finally { get_tag_control(cmb_categorie).reloading = false; } }
private void add_cat_Click(object sender, EventArgs e) { try { get_tag_control("categorie").reloading = true; frm_tooltip.hide_tooltip(); // chiedo il nome string title = frm_popup.popup_input("Nuova Categoria Spese", "Inserisci il titolo della categoria", this.main, "Nuova Categoria"); if (string.IsNullOrEmpty(title)) { return; } cat_spesa cs = cat_spesa.al.ins_cat_spesa(logged.utente(), title); object prev = get_combo("categorie").SelectedValue; refresh_cats_spesa(); if (prev != null) { get_combo("categorie").SelectedValue = prev; } else { get_combo("categorie").SelectedIndex = -1; } } catch (Exception ex) { main.set_status_err(ex); } finally { get_tag_control("categorie").reloading = false; } }
protected void del_cat() { cat_spesa c = (cat_spesa)cmb_categorie.SelectedItem; if (c != null) { c.delete(); refresh_cats_spesa(); } }
private void btn_del_cat_Click(object sender, EventArgs e) { cat_spesa c = (cat_spesa)cmb_categorie.SelectedItem; if (c != null) { c.delete(); refresh_cats_spesa(); } }
private void del_cat_Click(object sender, EventArgs e) { cat_spesa c = (cat_spesa)get_combo("categorie").SelectedItem; if (c != null) { c.delete(); refresh_cats_spesa(); } }
protected void upd_cat() { cat_spesa c = (cat_spesa)cmb_categorie.SelectedItem; if (c != null) { // chiedo il nome string title = frm_popup.popup_input("Aggiorna Categoria Spese", "Inserisci il titolo della categoria", main, c.title); if (string.IsNullOrEmpty(title)) { return; } c.title = title; c.update(); refresh_cats_spesa(); cmb_categorie.SelectedValue = c.id; load_tipi_spesa(true); } }
private void btn_upd_cat_Click(object sender, EventArgs e) { cat_spesa c = (cat_spesa)cmb_categorie.SelectedItem; if (c != null) { // chiedo il nome string title = frm_popup.popup_input("Nuova Categoria Spese", "Inserisci il titolo della categoria", main, c.title); if (string.IsNullOrEmpty(title)) { return; } c.title = title; c.update(); refresh_cats_spesa(); cmb_categorie.SelectedValue = c.id; load_tipi_spesa(true); } }