Пример #1
0
        private void dataGridViewX1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            if (e.ColumnIndex < 0)
            {
                return;
            }
            if (e.RowIndex < 0)
            {
                return;
            }
            DataGridViewCell cell = dataGridViewX1.Rows[e.RowIndex].Cells[e.ColumnIndex];

            _targetGroupID = "" + cell.OwningRow.Tag; //  targetTermName


            UDT_MakeUpGroup selectedGroup = _makeUpGroupList.Find(g => g.UID == _targetGroupID);


            // 管理補考成績
            InsertUpdateMakeUpGroupForm iumgf = new InsertUpdateMakeUpGroupForm(_schoolYear, _semester, "管理補考成績", selectedGroup);

            iumgf.ShowDialog();

            RefreshListView(); // 更改完成績後,重整畫面
        }
Пример #2
0
        private void dataGridViewX1_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.Button != MouseButtons.Left)
            {
                return;
            }
            if (e.ColumnIndex < 0)
            {
                return;
            }
            if (e.RowIndex < 0)
            {
                return;
            }
            DataGridViewCell cell = dataGridViewX1.Rows[e.RowIndex].Cells[e.ColumnIndex];

            if (lblIsDirty.Visible)
            {
                FISCA.Presentation.Controls.MsgBox.Show("編輯群組資料前,請先儲存。");
                return;
            }

            // 紀錄目前 UID
            GroupUIDList.Clear();
            foreach (DataGridViewRow drv in dataGridViewX1.Rows)
            {
                if (drv.IsNewRow)
                {
                    continue;
                }

                string uid = drv.Tag.ToString();
                GroupUIDList.Add(uid);
            }

            ////  找到選取到的 梯次
            _selectedGroup = _selectedGroupList.Find(x => x.UID == "" + cell.OwningRow.Tag);

            if (_action == "管理補考成績")
            {
                // 管理補考成績
                InsertUpdateMakeUpGroupForm iumgf = new InsertUpdateMakeUpGroupForm(_schoolYear, _semester, "管理補考成績", _selectedGroup);
                if (iumgf.ShowDialog() == DialogResult.Yes)
                {
                    RefreshListView(); //重整畫面
                }
            }
            else
            {
                // 修改模式
                InsertUpdateMakeUpGroupForm iumgf = new InsertUpdateMakeUpGroupForm(_schoolYear, _semester, "修改群組", _selectedGroup);
                if (iumgf.ShowDialog() == DialogResult.Yes)
                {
                    RefreshListView(); //重整畫面
                }
            }

            //RefreshListView(); //重整畫面
        }
Пример #3
0
        // 新增補考群組
        private void MenuItemInsertGroup_Click(Object sender, System.EventArgs e)
        {
            // 修改模式
            InsertUpdateMakeUpGroupForm iumgf = new InsertUpdateMakeUpGroupForm(_schoolYear, _semester, "新增群組", _selectedBatch);

            iumgf.ShowDialog();

            RefreshListView(); //重整畫面
        }