Пример #1
0
        private void listView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (listView1.SelectedIndices.Count <= 0)
            {
                return;
            }
            int selectedIndex = listView1.SelectedIndices[0];

            if (selectedIndex < 0)
            {
                return;
            }
            string type = "";
            int    j    = 0;

            while (type == "")
            {
                type = listView1.Items[selectedIndex - j].SubItems[0].Text;
                j++;
            }
            int    i      = 1;
            string id     = listView1.Items[selectedIndex].SubItems[i++].Text;
            string name   = listView1.Items[selectedIndex].SubItems[i++].Text;
            string year   = listView1.Items[selectedIndex].SubItems[i++].Text;
            string month  = listView1.Items[selectedIndex].SubItems[i++].Text;
            string day    = listView1.Items[selectedIndex].SubItems[i++].Text;
            bool   isGreg = listView1.Items[selectedIndex].SubItems[i++].Text == "כן";
            string pic    = listView1.Items[selectedIndex].SubItems[i].Text;
            FormRptShowPictureAnnual frm = new FormRptShowPictureAnnual(isGreg, id, type, name, year, month, day, pic);

            this.Hide();
            frm.Show();
            frm.Disposed += frm_Disposed;
        }
Пример #2
0
 private void ShowPicture(int idToShow, int index)
 {
     if (isAnnuals[index])
     {
         FormRptShowPictureAnnual fr = new FormRptShowPictureAnnual(idToShow, dataConnection);
         this.Hide();
         fr.Show();
         fr.Disposed += fr_Disposed;
     }
     else
     {
         FormRptShowPictureEvent fr = new FormRptShowPictureEvent(idToShow, dataConnection);
         this.Hide();
         fr.Show();
         fr.Disposed += fr_Disposed;
     }
 }