private void Management_Load(object sender, EventArgs e) { lbID.Text = ""; lbSubID.Text = ""; gbSubLink.Enabled = false; ListLinkDTO = FromEvents.GetListLinkDTO(); LoadLinkDTOToListView(ListLinkDTO); }
private void InsertOrUpdateLinkDTO(LinkDTO dto) { bool isOK = FromEvents.InsertOrUpdateLinkDTO(dto); if (isOK) { lbID.Text = ""; ListLinkDTO = FromEvents.GetListLinkDTO(); LoadLinkDTOToListView(ListLinkDTO); } }
private void InsertOrUpdateSubLinkDTO(SubLinkDTO dto) { bool isOK = FromEvents.InsertOrUpdateSubLinkDTO(dto); if (isOK) { lbSubID.Text = ""; var listDTO = FromEvents.GetListLinkDTO(); var link = FromEvents.GetLinkDTO(dto.LinkID, listDTO); LoadSubLinkDTOToListView(link.ListSubLink); } }
private void btnDelete_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(lbID.Text)) { bool isOK = FromEvents.DeleteLinkDTO(lbID.Text); if (isOK) { CleanLinkDTO(); } ListLinkDTO = FromEvents.GetListLinkDTO(); LoadLinkDTOToListView(ListLinkDTO); } }