Пример #1
0
        // 관항목 '추가'
        private void button3_Click(object sender, EventArgs e)
        {
            String name = "관 추가";

            cellContent gCell = new cellContent("", this.관data.RowCount, 0);

            Setting_budget_add addForm = new Setting_budget_add(g_CodeNumber, 0, gCell, name, strPath, this);

            addForm.StartPosition = FormStartPosition.Manual;
            addForm.Location      = new Point(250, 300);
            addForm.Show();
        }
Пример #2
0
        // 관항목 '수정'
        private void button4_Click(object sender, EventArgs e)
        {
            String name = "관 수정";

            try {
                string      cell_name  = this.관data.Rows[k.RowIndex].Cells[1].Value.ToString();
                string      cell_order = this.관data.Rows[k.RowIndex].Cells[2].Value.ToString();
                cellContent gCell      = new cellContent(cell_name, this.관data.RowCount, int.Parse(cell_order));

                Setting_budget_add addForm = new Setting_budget_add(name, gCell, strPath, this);
                addForm.StartPosition = FormStartPosition.Manual;
                addForm.Location      = new Point(250, 300);
                addForm.Show();
            }
            catch {
                MessageBox.Show("지정된 자료가 없습니다.", "오류");
            }
        }
Пример #3
0
        private void button7_Click(object sender, EventArgs e)
        {
            String name = "항 수정";

            if (h == null)
            {
                MessageBox.Show("지정된 자료가 없습니다.", "오류");
            }
            else
            {
                string      cell_name  = this.항data.Rows[this.h.RowIndex].Cells[1].Value.ToString();
                string      cell_order = this.항data.Rows[this.h.RowIndex].Cells[2].Value.ToString();
                cellContent gCell      = new cellContent(cell_name, this.항data.RowCount, int.Parse(cell_order));

                Setting_budget_add addForm = new Setting_budget_add(h_CodeNumber, 0, gCell, name, strPath, this);
                addForm.StartPosition = FormStartPosition.Manual;
                addForm.Location      = new Point(250, 300);
                addForm.Show();
            }
        }
Пример #4
0
        private void button8_Click(object sender, EventArgs e)
        {
            String name      = "항 추가";
            int    cellCount = 0;
            int    gCode     = int.Parse(this.관data.Rows[k.RowIndex].Cells[0].Value.ToString());

            foreach (DataGridViewRow row in this.항data.Rows)
            {
                if (int.Parse(row.Cells[3].Value.ToString()) == gCode)
                {
                    cellCount++;
                }
            }
            cellContent gCell = new cellContent("", cellCount, 0);

            Setting_budget_add addForm = new Setting_budget_add(h_CodeNumber, gCode, gCell, name, strPath, this);

            addForm.StartPosition = FormStartPosition.Manual;
            addForm.Location      = new Point(250, 300);
            addForm.Show();
        }