예제 #1
0
 private void просмотрМестПроведенияToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         int     ri = dgv1.SelectedCells[0].RowIndex;
         AddConf ac = new AddConf(Convert.ToInt32(dgv1[0, ri].Value.ToString()), false);
         ac.ShowDialog();
     }
     catch
     {
         MessageBox.Show("Не удалось. Обратитесь к администратору системы.");
     }
 }
예제 #2
0
        private void dgv1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1 && e.ColumnIndex != 3)
                {
                    Sql sql1 = new Sql();

                    string count = sql1.GetRecordsOne("exec MarkAct_Select_Plan @p1, @p2, @p3", dgv1[0, e.RowIndex].Value.ToString(), globalData.year, 0);

                    if (count == "0")
                    {
                        globalData.maplan = 0;
                        AddEditMAType am = new AddEditMAType(Convert.ToInt32(dgv1[0, e.RowIndex].Value), dgv1[1, e.RowIndex].Value.ToString(), dgv1[2, e.RowIndex].Value.ToString(), dgv1[3, e.RowIndex].Value.ToString(), dgv1[4, e.RowIndex].Value.ToString(), dgv1[5, e.RowIndex].Value.ToString());
                        am.ShowDialog();
                    }
                    else if (count == "1")
                    {
                        globalData.maplan = Convert.ToInt32(sql1.GetRecordsOne("exec MarkAct_Select_Plan @p1, @p2, @p3", dgv1[0, e.RowIndex].Value.ToString(), globalData.year, 1));
                    }
                    else
                    {
                        AddConf ac = new AddConf(Convert.ToInt32(dgv1[0, e.RowIndex].Value.ToString()), false);
                        ac.ShowDialog();
                    }
                }
            }
            catch
            {
            }
            finally
            {
                globalData.matype = dgv1[6, e.RowIndex].Value.ToString();
                this.Close();
            }
        }
예제 #3
0
        private void dgv1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                if (e.RowIndex != -1 && e.ColumnIndex != 3)
                {
                    Sql sql1 = new Sql();

                    string count = sql1.GetRecordsOne("exec MarkAct_Select_Plan @p1, @p2, @p3", dgv1[0, e.RowIndex].Value.ToString(), globalData.year, 0);

                    if (count == "0")
                    {
                        globalData.maplan = 0;
                        AddEditMAType am = new AddEditMAType(Convert.ToInt32(dgv1[0, e.RowIndex].Value), dgv1[1, e.RowIndex].Value.ToString(), dgv1[2, e.RowIndex].Value.ToString(), dgv1[3, e.RowIndex].Value.ToString(), dgv1[4, e.RowIndex].Value.ToString(), dgv1[5, e.RowIndex].Value.ToString());
                        am.ShowDialog();
                    }
                    else if (count == "1")
                    {
                        globalData.maplan = Convert.ToInt32(sql1.GetRecordsOne("exec MarkAct_Select_Plan @p1, @p2, @p3", dgv1[0, e.RowIndex].Value.ToString(), globalData.year, 1));
                    }
                    else
                    {
                        AddConf ac = new AddConf(Convert.ToInt32(dgv1[0, e.RowIndex].Value.ToString()), false);
                        ac.ShowDialog();

                    }
                }
            }
            catch
            {
            }
            finally
            {
                globalData.matype = dgv1[6, e.RowIndex].Value.ToString();
                this.Close();
            }
        }
예제 #4
0
 private void просмотрМестПроведенияToolStripMenuItem_Click(object sender, EventArgs e)
 {
     try
     {
         int ri = dgv1.SelectedCells[0].RowIndex;
         AddConf ac = new AddConf(Convert.ToInt32(dgv1[0, ri].Value.ToString()), false);
         ac.ShowDialog();
     }
     catch
     {
         MessageBox.Show("Не удалось. Обратитесь к администратору системы.");
     }
 }