コード例 #1
0
        public JsonResult GetInitialAppointmentByClientId(string clientId)
        {
            Scheduler schedule = new FingerprintsModel.Scheduler();

            try
            {
                schedule.AgencyId = new Guid(Session["AgencyId"].ToString());
                schedule.ClientId = Convert.ToInt64(EncryptDecrypt.Decrypt64(clientId));
                schedule          = new HomevisitorData().GetInitialAppointmentByClientId(schedule);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(schedule, JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public JsonResult CheckAvailableAppointment(string startTime, string endTime, string meetingDate)
        {
            bool isResult = false;

            try
            {
                Scheduler schedular = new FingerprintsModel.Scheduler();
                schedular.StartTime   = startTime;
                schedular.EndTime     = endTime;
                schedular.MeetingDate = meetingDate;
                isResult = homeVisitorData.CheckAvailableAppointment(schedular);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(isResult, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public JsonResult UpdateScheduleAppointment(string scheduleString, string meetingStartTime, string meetingEndTime, string meetingDuration)
        {
            bool isResult = false;

            try
            {
                Scheduler scheduler = new FingerprintsModel.Scheduler();
                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                scheduler          = serializer.Deserialize <Scheduler>(scheduleString);
                scheduler.ClientId = Convert.ToInt64(EncryptDecrypt.Decrypt64(scheduler.Enc_ClientId));
                isResult           = homeVisitorData.UpdateScheduleAppointment(scheduler, meetingStartTime, meetingEndTime, meetingDuration);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(isResult));
        }
コード例 #4
0
        public JsonResult GetInitialAppointmentByClientId(string clientId)
        {
            Scheduler        schedule     = new FingerprintsModel.Scheduler();
            List <Scheduler> scheduleList = new List <FingerprintsModel.Scheduler>();

            try
            {
                schedule.AgencyId    = new Guid(Session["AgencyId"].ToString());
                schedule.ClientId    = Convert.ToInt64(EncryptDecrypt.Decrypt64(clientId));
                schedule.MeetingDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).ToString("MM/dd/yyyy");
                schedule.EndDate     = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(-1).ToString("MM/dd/yyyy");
                schedule             = homeVisitorData.GetInitialAppointmentByClientId(ref scheduleList, schedule);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(new { schedule, scheduleList }, JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public JsonResult GetFilteredDates(string dateString, string listString, string clientId)
        {
            List <string> dates  = new List <string>();
            List <string> dates2 = new List <string>();

            try
            {
                JavaScriptSerializer serializer = new JavaScriptSerializer();
                dates  = serializer.Deserialize <List <string> >(dateString);
                dates2 = serializer.Deserialize <List <string> >(listString);
                Scheduler schedular = new FingerprintsModel.Scheduler();
                schedular.ClientId = (clientId == null || clientId == "") ? 0 : Convert.ToInt64(EncryptDecrypt.Decrypt64(clientId));
                dates = homeVisitorData.GetFilteredDates(dates, dates2, schedular);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(dates, JsonRequestBehavior.AllowGet));
        }
コード例 #6
0
        public JsonResult GetHomeVisitAttendanceByFromDate(string date, string clientId)
        {
            List <Scheduler> schedularList = new List <FingerprintsModel.Scheduler>();

            try
            {
                Scheduler schedule = new FingerprintsModel.Scheduler();
                schedule.MeetingDate  = date;
                schedule.Enc_ClientId = clientId;
                schedule.ClientId     = Convert.ToInt64(EncryptDecrypt.Decrypt64(clientId));
                schedule.AgencyId     = new Guid(Session["AgencyId"].ToString());
                schedule.StaffId      = new Guid(Session["UserID"].ToString());
                schedularList         = new HomevisitorData().GetHomeVisitAttendanceByFromDate(schedule);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(schedularList, JsonRequestBehavior.AllowGet));
        }
コード例 #7
0
        public JsonResult CheckAvailableAppointment(string startTime, string endTime, string meetingDate)
        {
            bool isResult = false;

            try
            {
                Scheduler schedular = new FingerprintsModel.Scheduler();
                schedular.StartTime   = startTime;
                schedular.EndTime     = endTime;
                schedular.MeetingDate = meetingDate;
                schedular.StaffId     = new Guid(Session["UserID"].ToString());
                schedular.AgencyId    = new Guid(Session["AgencyID"].ToString());
                isResult = new HomevisitorData().CheckAvailableAppointment(schedular);
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(isResult, JsonRequestBehavior.AllowGet));
        }
コード例 #8
0
        public JsonResult UpdateScheduleAppointment(string scheduleString, string meetingStartTime, string meetingEndTime, string meetingDuration)
        {
            bool isResult = false;

            try
            {
                Scheduler scheduler = new FingerprintsModel.Scheduler();
                System.Web.Script.Serialization.JavaScriptSerializer serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
                scheduler             = serializer.Deserialize <Scheduler>(scheduleString);
                scheduler.ClientId    = Convert.ToInt64(EncryptDecrypt.Decrypt64(scheduler.Enc_ClientId));
                scheduler.AgencyId    = new Guid(Session["AgencyId"].ToString());
                scheduler.StaffId     = new Guid(Session["UserId"].ToString());
                scheduler.StaffRoleId = new Guid(Session["RoleID"].ToString());
                isResult = new HomevisitorData().UpdateScheduleAppointment(scheduler, meetingStartTime, meetingEndTime, meetingDuration);
                var res = Session["RoleID"].ToString();
            }
            catch (Exception ex)
            {
                clsError.WriteException(ex);
            }
            return(Json(isResult));
        }