Beispiel #1
0
 public static string GetClassCalendar(string student_id, string class_id, string selected_year, string selected_month, string start_date, string end_date, string today, string targetday)
 {
     string html = string.Empty;
     try
     {
         if (class_id.Equals(string.Empty)) class_id = "-1";
         if (!class_id.Equals("-1"))
         {
             GnkCalenterInterface calendar = new GnkCalenterInterface();
             html = calendar.GetAttendanceBook(student_id, int.Parse(selected_year), int.Parse(selected_month), int.Parse(class_id), int.Parse(start_date), int.Parse(end_date), int.Parse(today), int.Parse(targetday));
         }
     }
     catch (Exception ex)
     {
         html = string.Empty;
     }
     return html;
 }
 public static string GetStudentCalendar(string student_id, string class_id, string selected_year, string selected_month, string start_date, string end_date, string today, string targetday)
 {
     string html = string.Empty;
     try
     {
         if (class_id.Equals(string.Empty)) class_id = "-1";
         if (!class_id.Equals("-1"))
         {
             if (student_id.Length == 0)
             {
                 string result = db.GetStudentInfo(class_id);
                 List<string> list_result = new List<string>();
                 list_result.AddRange(result.Split(','));
                 student_id = list_result[0].ToString();
                 start_date = list_result[1].ToString();
                 end_date = list_result[2].ToString();
             }
             GnkCalenterInterface calendar = new GnkCalenterInterface();
             html = calendar.GetAttendanceBook(student_id, int.Parse(selected_year), int.Parse(selected_month), int.Parse(class_id), int.Parse(start_date), int.Parse(end_date), int.Parse(today), int.Parse(targetday));
         }
     }
     catch (Exception ex)
     {
         html = string.Empty;
     }
     return html;
 }
 public static string GetClassCalendar(string teacher_id, string year, string month, string today, string targetday)
 {
     string html = string.Empty;
     try
     {
         GnkCalenterInterface calendar = new GnkCalenterInterface();
         html = calendar.GetClassCalendar(teacher_id, int.Parse(year), int.Parse(month), int.Parse(today), int.Parse(targetday));
     }
     catch (Exception ex)
     {
         html = string.Empty;
     }
     return html;
 }
 private void GetLevelTestCaendar()
 {
     GnkCalenterInterface calendar = new GnkCalenterInterface();
     calendar_html = calendar.CalendarForNewClass(year, month, today, 20);
 }
Beispiel #5
0
        public static string GetEndDate(string date)
        {
            string year = date.Substring(0, 4);
            string end_date = string.Empty;

            try
            {
                GnkCalenterInterface calendar = new GnkCalenterInterface();
                end_date = calendar.ApiGetEndDate(year, date, "20");
            }
            catch (Exception ex)
            {
                end_date = "00000000";
            }

            return end_date;
        }