예제 #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();
            }
        }
예제 #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);
        }
예제 #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();
                }
            }
        }
예제 #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();
                }
            }
        }
예제 #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;
        }
예제 #6
0
 private void showAddEditDiagCard(DiagCard dCard)
 {
     DiagCard_AddEdit vAE = new DiagCard_AddEdit(dCard);
     vAE.ShowDialog();
 }
예제 #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();
            }
        }
예제 #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();
            }
        }
예제 #9
0
        private void showAddEditDiagCard(DiagCard dCard)
        {
            DiagCard_AddEdit vAE = new DiagCard_AddEdit(dCard);

            vAE.ShowDialog();
        }
예제 #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();
                }
            }
        }