Пример #1
0
        /// <summary>
        /// 重新載入修課人數資訊。
        /// </summary>
        public static void ReloadCourseStudentCount()
        {
            System.Threading.ThreadPool.QueueUserWorkItem(x =>
            {
                try
                {
                    FISCA.DSAUtil.DSXmlHelper req = new FISCA.DSAUtil.DSXmlHelper();
                    req.AddElement("Field");
                    req.AddElement("Field", "ID");
                    req.AddElement("Field", "StudentCount");
                    req.AddElement("Condition");
                    req.AddElement("Condition", "Status", "1");
                    req.AddElement("Condition", "Status", "2");

                    DSResponse rsp = DSAServices.CallService("SmartSchool.Course.GetCourseAttendCount", new DSRequest(req));

                    lock (CSCount_SyncRoot)
                    {
                        CSCount = new Dictionary <string, int>();
                        foreach (XmlElement each in rsp.GetContent().GetElements("Course"))
                        {
                            CSCount.Add(each.GetAttribute("ID"), int.Parse(each.SelectSingleNode("StudentCount").InnerText));
                        }
                    }
                }
                catch (FISCA.DSAUtil.DSAServerException ex)
                {
                    if (ex.ServerStatus == FISCA.DSAUtil.DSAServerStatus.ServiceNotFound)
                    {
                        System.IO.File.AppendAllText("缺少Service.txt", "SmartSchool.Course.GetCourseAttendCount");
                    }
                    else
                    {
                        throw;
                    }
                }
                finally
                {
                }
            });
        }
Пример #2
0
 public static DSResponse AttendCourse(FISCA.DSAUtil.DSXmlHelper request)
 {
     return(FISCA.Authentication.DSAServices.CallService("SmartSchool.Course.InsertSCAttend", new DSRequest(request)));
 }