コード例 #1
0
        private void cmdAddNew_Click(object sender, EventArgs e)
        {
            var form = new AttributeItem();

            form.AuthorizationID = _AuthorizationID;
            form.Mode            = Mode.Create;
            form.FormClosed     += AttributeRecord_FormClosed;
            form.ShowDialog();
        }
コード例 #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  = _Authorization.GetAttribute(key);

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