Example #1
0
        private void btnAddDiagCard_Click(object sender, EventArgs e)
        {
            DiagCard diagCard = _car.createDiagCard();

            DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);

            if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                diagCardList.Add(diagCard);

                loadDiagCard();
            }
        }
Example #2
0
        private ToolStripMenuItem CreateNewDiagCard()
        {
            ToolStripMenuItem item = CreateItem("Новая диагностическая карта");

            item.Click += delegate
            {
                Car car = _dgvMain.GetCar();
                if (car == null)
                {
                    return;
                }

                DiagCard diagCard = car.createDiagCard();

                DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);
                diagcardAE.ShowDialog();
            };
            return(item);
        }
Example #3
0
        private void _dgvDiagCard_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int idDiagCard = Convert.ToInt32(_dgvDiagCard.Rows[e.RowIndex].Cells[0].Value);

            DiagCard diagCard = diagCardList.getItem(idDiagCard);


            if ((e.ColumnIndex == 4) && (diagCard.File != string.Empty))
            {
                WorkWithFiles.openFile(diagCard.File);
            }
            else
            {
                DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);

                if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    loadDiagCard();
                }
            }
        }
Example #4
0
        private void DoubleClickDiagCard(Point point)
        {
            if (_dgvMain.GetID() == 0)
            {
                return;
            }

            DiagCardList diagCardList = DiagCardList.getInstance();
            DiagCard     diagCard     = diagCardList.getItem(_dgvMain.GetID());

            if ((_dgvCar.Columns[point.X].HeaderText == "№ ДК") && (!string.IsNullOrEmpty(diagCard.File)))
            {
                WorkWithFiles.openFile(diagCard.File);
            }
            else
            {
                DiagCard_AddEdit diagCardAE = new DiagCard_AddEdit(diagCard);
                if (diagCardAE.ShowDialog() == DialogResult.OK)
                {
                    loadCars();
                }
            }
        }
Example #5
0
        private ToolStripMenuItem CreateNewDiagCard()
        {
            ToolStripMenuItem item = CreateItem("Новая диагностическая карта");
            item.Click += delegate
            {
                Car car = _dgvMain.GetCar();
                if (car == null)
                    return;

                DiagCard diagCard = car.createDiagCard();

                DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);
                diagcardAE.ShowDialog();
            };
            return item;
        }
Example #6
0
 private void showAddEditDiagCard(DiagCard dCard)
 {
     DiagCard_AddEdit vAE = new DiagCard_AddEdit(dCard);
     vAE.ShowDialog();
 }
Example #7
0
        private void btnAddDiagCard_Click(object sender, EventArgs e)
        {
            DiagCard diagCard = _car.createDiagCard();

            DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);
            if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                diagCardList.Add(diagCard);

                loadDiagCard();
            }
        }
Example #8
0
        private void _dgvDiagCard_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int idDiagCard = Convert.ToInt32(_dgvDiagCard.Rows[e.RowIndex].Cells[0].Value);

            DiagCard diagCard = diagCardList.getItem(idDiagCard);

            if ((e.ColumnIndex == 4) && (diagCard.File != string.Empty))
                WorkWithFiles.openFile(diagCard.File);
            else
            {
                DiagCard_AddEdit diagcardAE = new DiagCard_AddEdit(diagCard);

                if (diagcardAE.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    loadDiagCard();
            }
        }
Example #9
0
        private void showAddEditDiagCard(DiagCard dCard)
        {
            DiagCard_AddEdit vAE = new DiagCard_AddEdit(dCard);

            vAE.ShowDialog();
        }
Example #10
0
        private void DoubleClickDiagCard(Point point)
        {
            if (_dgvMain.GetID() == 0)
                return;

            DiagCardList diagCardList = DiagCardList.getInstance();
            DiagCard diagCard = diagCardList.getItem(_dgvMain.GetID());

            if ((_dgvCar.Columns[point.X].HeaderText == "№ ДК") && (!string.IsNullOrEmpty(diagCard.File)))
                WorkWithFiles.openFile(diagCard.File);
            else
            {
                DiagCard_AddEdit diagCardAE = new DiagCard_AddEdit(diagCard);
                if (diagCardAE.ShowDialog() == DialogResult.OK)
                {
                    loadCars();
                }
            }
        }