コード例 #1
0
        private void CopyInfo(bool isNeedCopyLPUFromCONAN)
        {
            if (isNeedCopyLPUFromCONAN)
            {
                int idLpuCompetitor;
                int.TryParse(dgvLPUCompetitors.Rows[dgvLPUCompetitors.CurrentCell.RowIndex].Cells[0].Value.ToString(), out idLpuCompetitor);
                LpuCompetitors lpuCompetitor = _lpuCompetitorsList.GetItem(idLpuCompetitor);

                _lpu.Name       = lpuCompetitor.Name;
                _lpu.INN        = lpuCompetitor.INN;
                _lpu.KPP        = lpuCompetitor.KPP;
                _lpu.RealRegion = lpuCompetitor.RealRegion;
            }

            int idLpuRR;

            int.TryParse(dgvLpuRR.Rows[dgvLpuRR.CurrentCell.RowIndex].Cells[0].Value.ToString(), out idLpuRR);

            //if (idLpuRR != 0)
            // {
            _lpu.LpuRR   = _lpuRRList.GetItem(idLpuRR) as LpuRR;
            DialogResult = System.Windows.Forms.DialogResult.OK;

            /*}
             * else
             * {
             *  MessageBox.Show("Сопоставление с прочими ЛПУ приостановлено. Для уточнения деталей обращайтесь с Тельнину Д.П..", "Предупреждение", MessageBoxButtons.OK, MessageBoxIcon.Warning);
             * }
             */
        }
コード例 #2
0
        private void LoadFromDataBase(string tableName)
        {
            DataTable dt = _provider.Select(tableName);

            foreach (DataRow row in dt.Rows)
            {
                LpuCompetitors lpuCompetitors = new LpuCompetitors(row);
                _list.Add(lpuCompetitors);
            }
        }