Пример #1
0
 private void Management_Load(object sender, EventArgs e)
 {
     lbID.Text         = "";
     lbSubID.Text      = "";
     gbSubLink.Enabled = false;
     ListLinkDTO       = FromEvents.GetListLinkDTO();
     LoadLinkDTOToListView(ListLinkDTO);
 }
Пример #2
0
 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));
     }
 }
Пример #3
0
        private void InsertOrUpdateLinkDTO(LinkDTO dto)
        {
            bool isOK = FromEvents.InsertOrUpdateLinkDTO(dto);

            if (isOK)
            {
                lbID.Text   = "";
                ListLinkDTO = FromEvents.GetListLinkDTO();
                LoadLinkDTOToListView(ListLinkDTO);
            }
        }
Пример #4
0
 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);
     }
 }
Пример #5
0
        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);
            }
        }
Пример #6
0
 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);
     }
 }
Пример #7
0
 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");
     }
 }