コード例 #1
0
ファイル: BuildWizard.cs プロジェクト: ischoolinc/JHPermrec
        private void buttonX6_Click(object sender, EventArgs e)
        {
            // 檢查勾選學生人數
            int checkSelectCount   = 0;
            List <XmlElement> list = new List <XmlElement>();

            foreach (ListViewItem var in listView2.Items)
            {
                if (var.Checked)
                {
                    list.Add((XmlElement)var.Tag);
                    checkSelectCount++;
                }
            }

            // 當沒有勾選學生
            if (checkSelectCount == 0)
            {
                FISCA.Presentation.Controls.MsgBox.Show("請勾選學生..");
                return;
            }

            UpdateRecordBatch.InsertUpdateRecordBatch(txtNameListName.Text, comboBoxEx1.Text, comboBoxEx2.Text, _NameListProvider.CreateNameList(comboBoxEx1.Text, comboBoxEx2.Text, list));
            //_NameListProvider.CreateNameList(comboBoxEx1.Text, comboBoxEx2.Text, list).OwnerDocument.Save("D:\\1234.xml");
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
コード例 #2
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            string id         = "";
            string batchName  = "";
            string schoolYear = "";
            string semester   = "";

            if (itmPanelLeft.SelectedItems.Count < 1)
            {
                return;
            }
            //if (lstList.FocusedItem == null)
            //    return;
            foreach (ButtonItem item in itmPanelLeft.SelectedItems)
            {
                if (item.Checked == true)
                {
                    id = item.Tag.ToString();
                }
            }


            if (id != "")
            {
                DSResponse dsrsp = QueryStudent.GetUpdateRecordBatch(id);

                DSXmlHelper helper = dsrsp.GetContent();

                //填上名冊的 學年、學期、名稱
                foreach (XmlNode node in helper.GetElements("UpdateRecordBatch"))
                {
                    schoolYear = node.SelectSingleNode("SchoolYear").InnerText;
                    semester   = node.SelectSingleNode("Semester").InnerText;
                    batchName  = node.SelectSingleNode("Name").InnerText;
                }

                if (MsgBox.Show("您確定刪除該名冊及其內容?", "確定", MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    UpdateRecordBatch.DeleteBatch(id);

                    // log,2018/3/1 穎驊新增,因應高雄 [10-03][01] 整個學年度核准過的文號的異動名冊全部不見了 項目
                    // 本異動名冊 原只有新增會有系統紀錄,現在調整刪除、登打文號都會有紀錄
                    JHSchool.PermRecLogProcess prlp = new JHSchool.PermRecLogProcess();
                    string desc = "刪除" + schoolYear + "學年度,第" + semester + "學期," + batchName + "名冊";
                    prlp.SaveLog("教務.名冊", "刪除", desc);
                    Initialize();
                    LoadBatchList();
                }
            }
        }
コード例 #3
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (lstList.FocusedItem == null)
            {
                return;
            }
            string id = lstList.FocusedItem.Tag.ToString();

            if (MsgBox.Show("您確定刪除該名冊及其內容?", "確定", MessageBoxButtons.YesNo) == DialogResult.Yes)
            {
                UpdateRecordBatch.DeleteBatch(id);
                Initialize();
                LoadBatchList();
            }
        }
コード例 #4
0
        private void buttonX6_Click(object sender, EventArgs e)
        {
            List <XmlElement> list = new List <XmlElement>();

            foreach (ListViewItem var in listView2.Items)
            {
                if (var.Checked)
                {
                    list.Add((XmlElement)var.Tag);
                }
            }
            try
            {
                UpdateRecordBatch.InsertUpdateRecordBatch(txtNameListName.Text, comboBoxEx1.Text, comboBoxEx2.Text, _NameListProvider.CreateNameList(comboBoxEx1.Text, comboBoxEx2.Text, list));
            }
            catch (Exception ex)
            {
                FISCA.Presentation.Controls.MsgBox.Show("產生名冊XML發生錯誤" + ex.Message);
            }
            //_NameListProvider.CreateNameList(comboBoxEx1.Text, comboBoxEx2.Text, list).OwnerDocument.Save("D:\\1234.xml");
            this.DialogResult = DialogResult.OK;
            this.Close();
        }