Exemplo n.º 1
0
        private void cmdAddNew_Click(object sender, EventArgs e)
        {
            var form = new AttributeItem();

            form.AttributeID = _AuthorizationID;
            form.Mode        = Mode.Create;
            form.FormClosed += AttributeRecord_FormClosed;
            form.ShowDialog();
        }
Exemplo n.º 2
0
        private void EditRecord()
        {
            if (lvwAttributes.SelectedItem != null)
            {
                var key   = lvwAttributes.SelectedItem.SubItems[0].Text;
                var value = lvwAttributes.SelectedItem.SubItems[1].Text;
                var index = int.Parse(lvwAttributes.SelectedItem.SubItems[2].Text);
                var item  = _Application.GetAttribute(key);

                var edit = new AttributeItem();
                edit.AttributeID = item.AttributeId;    // _AuthorizationID;
                //edit.AttributeID = item.AttributeId;
                edit.AttributeKey = item.Key;
                edit.Mode         = Mode.Update;
                edit.FormClosed  += AttributeRecord_FormClosed;
                edit.ShowDialog();
            }
        }