예제 #1
0
        public JsonResult GetEventList(string SDATE, string EDATE)
        {
            List <OutgoingEventModel> M = ModelFactory.GetEventList(LoginUserInfo.UserId, SDATE, EDATE);



            //將工作日寫入日歷中
            MainModelFactory          MainFactory = new MainModelFactory();
            List <CalendarEventModel> HolidayList = new List <CalendarEventModel>();

            HolidayList.AddRange(MainFactory.GetHolidayList(LoginUserInfo.Company, SDATE, EDATE));
            for (int i = 0; i < HolidayList.Count; i++)
            {
                OutgoingEventModel Cal = new OutgoingEventModel();

                Cal.OutId           = "";
                Cal.id              = HolidayList[i].id;
                Cal.title           = HolidayList[i].title;
                Cal.start           = HolidayList[i].start;
                Cal.allDay          = true;
                Cal.self            = true;
                Cal.backgroundColor = HolidayList[i].backgroundColor;
                Cal.color           = HolidayList[i].color;
                Cal.textColor       = HolidayList[i].textColor;
                M.Add(Cal);
            }



            return(Json(M));
        }
예제 #2
0
        //
        // GET: /App/


        /// <summary>
        /// 外出紀錄
        /// </summary>
        /// <param name="EmpNo"></param>
        /// <param name="SDATE"></param>
        /// <param name="EDATE"></param>
        /// <returns></returns>
        public JsonResult Outgoing(string EmpNo, string SDATE, string EDATE)
        {
            OutgoingModelFactory      ModelFactory = new OutgoingModelFactory();
            List <OutgoingEventModel> M            = ModelFactory.GetEventList(EmpNo, SDATE, EDATE);

            return(Json(M, JsonRequestBehavior.AllowGet));
        }
예제 #3
0
        public JsonResult GetCalendarAllList(string Company, string EmpNo, string SDATE, string EDATE)
        {
            OutgoingModelFactory      ModelFactory = new OutgoingModelFactory();
            List <OutgoingEventModel> Box          = null;

            if (EmpNo == null || EmpNo == "")
            {
                //未登入-預設台北行事曆
                Box     = new List <OutgoingEventModel>();
                Company = "TPE";
            }
            else
            {
                Box = ModelFactory.GetEventList(EmpNo, SDATE, EDATE);
            }



            //將工作日寫入日歷中
            MainModelFactory          MainFactory = new MainModelFactory();
            List <CalendarEventModel> HolidayList = new List <CalendarEventModel>();

            HolidayList.AddRange(MainFactory.GetHolidayList(Company, SDATE, EDATE));
            for (int i = 0; i < HolidayList.Count; i++)
            {
                OutgoingEventModel Cal = new OutgoingEventModel();

                Cal.OutId           = "";
                Cal.id              = HolidayList[i].id;
                Cal.title           = HolidayList[i].title;
                Cal.start           = HolidayList[i].start;
                Cal.allDay          = true;
                Cal.self            = true;
                Cal.backgroundColor = HolidayList[i].backgroundColor;
                Cal.color           = HolidayList[i].color;
                Cal.textColor       = HolidayList[i].textColor;
                Box.Add(Cal);
            }


            return(Json(Box, JsonRequestBehavior.AllowGet));
        }