private void LstTypes_Click(object sender, EventArgs e) { if (lstTypes.SelectedIndex > -1) { type = lstTypes.SelectedItem as MODEL.Entities.Type; } }
private void BtnSave_Click(object sender, EventArgs e) { type = new MODEL.Entities.Type(); type.TypeName = txtTypeName.Text; type.Description = txtTypeDescription.Text; typeRepository.Add(type); ClearTextBoxes(); }
private void Lsttypes_Click(object sender, EventArgs e) { if (lstTypes.SelectedIndex > -1) { type = lstTypes.SelectedItem as MODEL.Entities.Type; txtTypeName.Text = type.TypeName; txtTypeDescription.Text = type.Description; } }