private void Management_Load(object sender, EventArgs e) { lbID.Text = ""; lbSubID.Text = ""; gbSubLink.Enabled = false; ListLinkDTO = FromEvents.GetListLinkDTO(); LoadLinkDTOToListView(ListLinkDTO); }
private void lvSubLink_SelectedIndexChanged(object sender, EventArgs e) { if (lvSubLink.SelectedIndices.Count > 0) { int index = lvSubLink.SelectedIndices[0]; string id = lvSubLink.Items[index].Text; var link = FromEvents.GetLinkDTO(lbID.Text, ListLinkDTO); LoadSubLinkDTOSingle(FromEvents.GetSubLinkDTO(id, link.ListSubLink)); } }
private void InsertOrUpdateLinkDTO(LinkDTO dto) { bool isOK = FromEvents.InsertOrUpdateLinkDTO(dto); if (isOK) { lbID.Text = ""; ListLinkDTO = FromEvents.GetListLinkDTO(); LoadLinkDTOToListView(ListLinkDTO); } }
private void lvCrawlerLink_SelectedIndexChanged(object sender, EventArgs e) { if (lvCrawlerLink.SelectedIndices.Count > 0) { int index = lvCrawlerLink.SelectedIndices[0]; string id = lvCrawlerLink.Items[index].Text; var link = FromEvents.GetLinkDTO(id, ListLinkDTO); LoadLinkDTOSingle(link); gbSubLink.Enabled = true; LoadSubLinkDTOToListView(link.ListSubLink); } }
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); } }
private void btSubDelete_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(lbSubID.Text)) { bool isOK = FromEvents.DeleteLinkDTO(lbSubID.Text); if (isOK) { CleanSubLinkDTO(); } var link = FromEvents.GetLinkDTO(lbID.Text, ListLinkDTO); LoadSubLinkDTOToListView(link.ListSubLink); } else { MessageBox.Show("aidhsa"); } }