Пример #1
0
        private void openRecordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DialogResult openDialogResult = openFileDialog.ShowDialog();

            openFileDialog.InitialDirectory = @"parties";
            if (openDialogResult == DialogResult.OK)
            {
                OpenFileForm openFileForm = new OpenFileForm(openFileDialog.FileName);
                openFileForm.ShowDialog();
            }
        }
Пример #2
0
        private void viewButton_Click(object sender, EventArgs e)
        {
            int    selectedIntdex = bigDataGrid.SelectedCells[0].RowIndex;
            string partyName      = bigDataGrid.Rows[selectedIntdex].Cells[0].Value.ToString();
            string date           = bigDataGrid.Rows[selectedIntdex].Cells[1].Value.ToString();
            int    first          = date.IndexOf(' ');
            int    last           = date.LastIndexOf(' ');
            string day            = date.Substring(0, first);
            string month          = date.Substring(first + 1, last - first - 1);
            string year           = date.Substring(last + 1);
            string filePath       = @"parties\";

            filePath += partyName + "\\" + year + "\\"
                        + month + "\\" + day + ".ck";
            OpenFileForm openFileForm = new OpenFileForm(filePath);

            openFileForm.ShowDialog();
            anyCheckChanged();
        }
Пример #3
0
 private void viewButton_Click(object sender, EventArgs e)
 {
     if (resultGrid.Rows.Count != 1)
     {
         var    cells         = resultGrid.SelectedCells;
         int    row           = cells[0].RowIndex;
         string partySelected = resultGrid.Rows[row].Cells[0].Value.ToString();
         string date          = resultGrid.Rows[row].Cells[1].Value.ToString();
         int    first         = date.IndexOf(' ');
         int    last          = date.LastIndexOf(' ');
         string day           = date.Substring(0, first);
         string month         = date.Substring(first + 1, last - first - 1);
         string year          = date.Substring(last + 1);
         string filePath      = @"parties\";
         filePath += partySelected + "\\" + year + "\\" + month + "\\" + day + ".ck";
         OpenFileForm openFileForm = new OpenFileForm(filePath);
         openFileForm.ShowDialog();
     }
 }