/// <summary>
        /// 取得志願序內容
        /// </summary>
        static public List <OnlineVolunteer> GetVolunteer(Connection me, LoginSchool login, string SchoolYear, string Semester)
        {
            Envelope rsp        = me.SendRequest("_.GetStudentVolunteer", new Envelope(GetRequest(SchoolYear, Semester)));
            XElement Volunteers = XElement.Parse(rsp.Body.XmlString);
            List <OnlineVolunteer> VolunteerList = new List <OnlineVolunteer>();

            foreach (XElement Volunteer in Volunteers.Elements("K12.volunteer.universal"))
            {
                OnlineVolunteer cr = new OnlineVolunteer(Volunteer);
                cr.School = login.School_Name;
                VolunteerList.Add(cr);
            }
            return(VolunteerList);
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            bool check = false;

            foreach (DataGridViewRow row in dataGridViewX1.Rows)
            {
                if (row.IsNewRow)
                {
                    continue;
                }

                if ("" + row.Cells[ColStatus.Index].Value != "成功")
                {
                    check = true;
                }
            }
            if (check)
            {
                MsgBox.Show("資料尚有錯誤,無法儲存!!");
                return;
            }

            StringBuilder sb = new StringBuilder();

            sb.AppendLine("已調整志願分配部別設定:");
            sb.AppendLine("原設定:");

            List <LoginSchool> delList = tool._A.Select <LoginSchool>();

            tool._A.DeletedValues(delList);
            foreach (LoginSchool each in delList)
            {
                sb.AppendLine("學校「" + each.School_Name + "」" + "備註「" + each.Remark + "」");
            }

            sb.AppendLine("修改為:");

            List <LoginSchool> LoginSchoolList = new List <LoginSchool>();

            foreach (DataGridViewRow row in dataGridViewX1.Rows)
            {
                if (row.IsNewRow)
                {
                    continue;
                }

                if ("" + row.Cells[ColStatus.Index].Value == "成功")
                {
                    LoginSchool ls = new LoginSchool();
                    ls.School_Name = "" + row.Cells[SchoolDomain.Index].Value;
                    ls.Remark      = "" + row.Cells[remake.Index].Value;
                    LoginSchoolList.Add(ls);

                    sb.AppendLine("學校「" + ls.School_Name + "」" + "備註「" + ls.Remark + "」");
                }
            }

            if (LoginSchoolList.Count > 0)
            {
                tool._A.InsertValues(LoginSchoolList);
                FISCA.LogAgent.ApplicationLog.Log("志願分配部別設定", "連線學校", sb.ToString());

                MsgBox.Show("儲存成功");
                this.Close();
            }
            else
            {
                MsgBox.Show("未儲存任何資料!");
            }
        }
 /// <summary>
 /// 取得預設(學年度/學期)志願序內容
 /// </summary>
 static public List <OnlineVolunteer> GetDefVolunteer(Connection me, LoginSchool login)
 {
     return(GetVolunteer(me, login, K12.Data.School.DefaultSchoolYear, K12.Data.School.DefaultSemester));
 }