Example #1
0
        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);
            }
        }
Example #2
0
        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);
            }
        }