Example #1
0
        private void CreateItem()
        {
            AccountTypesEditView v = new AccountTypesEditView();

            v._id = -1;
            v.ShowDialog();
        }
Example #2
0
        private void EditSelectedItem()
        {
            int          id = 0;
            account_type b  = null;

            if (dgList.SelectedItem != null)
            {
                object sel = dgList.SelectedItem;
                b  = (account_type)sel;
                id = b.id;
            }
            if (id > 0)
            {
                AccountTypesEditView v = new AccountTypesEditView();
                v._id           = b.id;
                v.edtName.Text  = b.name;
                v.edtDescr.Text = b.description;
                v.ShowDialog();
                ReloadList();
            }
        }
 private void EditSelectedItem()
 {
     int id = 0;
     account_type b = null;
     if (dgList.SelectedItem != null)
     {
         object sel = dgList.SelectedItem;
         b = (account_type)sel;
         id = b.id;
     }
     if (id > 0)
     {
         AccountTypesEditView v = new AccountTypesEditView();
         v._id = b.id;
         v.edtName.Text = b.name;
         v.edtDescr.Text = b.description;
         v.ShowDialog();
         ReloadList();
     }
 }
 private void CreateItem()
 {
     AccountTypesEditView v = new AccountTypesEditView();
     v._id = -1;
     v.ShowDialog();
 }