Exemplo n.º 1
0
        //Get Doctor List By Schedule Date From Calender
        //public async Task<ActionResult> _doctor3listbyScheduleDate(DateTime? datetime = null, int pagesize = 5, int page = 1)
        //{
        //    PagedListClient<ScheduleDoctorViewModel> result = await Doctor3ApiRequestHelper.GetDoctorWithPaging(datetime, pagesize, page);
        //    return PartialView("_doctor3listbyScheduleDate", result);
        //}

        public async Task <ActionResult> _list(int docid = 0, int specialityid = 0, string docname = null, DateTime?datetime = null, DateTime?fromtime = null, DateTime?totime = null, int pagesize = 5, int page = 1)
        {
            int hospitalid = Helper.CookieHelper.getstaffHospitalID();
            PagedListClient <ScheduleBookingViewModel> result = await BookingApiRequestHelper.list(docid, specialityid, docname, datetime, fromtime, totime, pagesize, page, hospitalid);

            return(PartialView("_list", result));
        }
Exemplo n.º 2
0
        public async Task <ActionResult> _historylist(string name = null, DateTime?datetime = null, int pagesize = 10, int page = 1)
        {
            int hospitalid = CookieHelper.getstaffHospitalID();
            PagedListClient <tbAppointment> result = await HistoryApiRequestHelper.GetAppointmentHistoryListWithPaging(name, datetime, pagesize, page, hospitalid);

            return(PartialView("_historylist", result));
        }
        //public ActionResult _appointmentBookingList()
        //{
        //    return PartialView("_appointmentBookingList");
        //}

        public async Task <ActionResult> _appointmentBookingList(string name = null, string status = null, int pagesize = 10, int page = 1, DateTime?datetime = null, DateTime?time = null, int hospitalid = 0, int doctorid = 0)
        {
            hospitalid = CookieHelper.getstaffHospitalID();
            PagedListClient <tbAppointment> result = await AppointmentApiRequestHelper.GetAppointmentWithPaging(name, status, pagesize, page, datetime, time, hospitalid, doctorid);

            return(PartialView("_appointmentBookingList", result));
        }
Exemplo n.º 4
0
        private async Task PreparingSearchResult(PagedListClient <PostViewModel> model)
        {
            if (model == null || model.TotalItems == 0)
            {
                return;
            }
            var allLanguages = _selectListService.PreparingLanguageList();

            var requestUser = (await _selectListService.GetUserSelectList())
                              .ToDictionary(x => x.Value.ToLower(), x => x.Text);

            foreach (var post in model.Data)
            {
                post.CustomProperties["CreatedByName"] = requestUser[post.CreatedBy.ToString()];
                var languageDetails = await _postService.GetLanguageIdsByPostId(post.PostID);

                var languages = languageDetails.GetDataResponse();
                post.CustomProperties["Languages"] = languages.Select(x => new SelectListItem
                {
                    Text     = allLanguages.Find(l => l.Value == x.LanguageId.ToString())?.Text,
                    Value    = x.LanguageId.ToString(),
                    Selected = x.IsActivated
                });
            }
        }
Exemplo n.º 5
0
        //Get Doctor List By Schedule FromTime
        public async Task <ActionResult> DoctorListByTime(DateTime?fromtime = null, DateTime?totime = null, int pagesize = 0, int page = 0, int appointmentid = 0, DateTime?date = null)
        {
            int hospitalid = Helper.CookieHelper.getstaffHospitalID();
            PagedListClient <tbDoctor> result = await BookingApiRequestHelper.DoctorListByTime(fromtime, totime, pagesize, page, hospitalid, appointmentid, date);

            return(PartialView("_doctorListByScheduleTime", result));
        }
Exemplo n.º 6
0
 public YachtSearchViewModel()
 {
     Categories       = new List <CommonValueViewModel>();
     CharterTypes     = new List <CommonValueViewModel>();
     YachtTypes       = new List <CommonValueViewModel>();
     HullTypes        = new List <CommonValueViewModel>();
     YatchItems       = new PagedListClient <YachtPrivateCharterViewModel>();
     YachtSearchModel = new YachtSearchModel();
 }
        public async Task <ActionResult> _doctorScheduleList(string doctorname = null, string hospitalname = null, int pagesize = 10, int page = 1, int doctorid = 0, int specialtyid = 0, int hospitalid = 0)
        {
            string specialties = null;

            hospitalid = CookieHelper.getstaffHospitalID();
            PagedListClient <DoctorHospitalViewModel> result = await DoctorApiRequestHelper.GetDoctorWithPaging(doctorname, hospitalname, pagesize, page, doctorid, specialtyid, specialties, hospitalid);

            return(PartialView("_doctorScheduleList", result));
        }
Exemplo n.º 8
0
        public static async Task <PagedListClient <tbHospital> > GetHospitalWithPaging(string hospitalname = null, int pagesize = 10, int page = 1)
        {
            string url  = string.Format("api/hospital/list?hospitalname={0}&pagesize={1}&page={2}", hospitalname, pagesize, page);
            var    data = await ApiRequest <PagedListServer <tbHospital> > .GetRequest(url);

            var model     = new PagedListClient <tbHospital>();
            var pagedList = new StaticPagedList <tbHospital>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
        public static async Task <PagedListClient <ScheduleDoctorViewModel> > list(int id = 0, string docname = null, DateTime?fromdate = null, DateTime?todate = null, int pagesize = 10, int page = 1, int hospitalid = 0)
        {
            string url  = string.Format("api/schedule/list?id={0}&docname={1}&fromdate={2}&todate={3}&pagesize={4}&page={5}&hospitalid={6}", id, docname, fromdate, todate, pagesize, page, hospitalid);
            var    data = await ApiRequest <PagedListServer <ScheduleDoctorViewModel> > .GetRequest(url);

            var model     = new PagedListClient <ScheduleDoctorViewModel>();
            var pagedList = new StaticPagedList <ScheduleDoctorViewModel>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
Exemplo n.º 10
0
        public static async Task <PagedListClient <tbAppointment> > GetAppointmentHistoryListWithPaging(string name = null, DateTime?datetime = null, int pagesize = 10, int page = 1, int hospitalid = 0)
        {
            string url  = string.Format("api/appointment/historylist?name={0}&datetime={1}&pagesize={2}&page={3}", name, datetime, pagesize, page, hospitalid);
            var    data = await ApiRequest <PagedListServer <tbAppointment> > .GetRequest(url);

            var model     = new PagedListClient <tbAppointment>();
            var pagedList = new StaticPagedList <tbAppointment>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
        public static async Task <PagedListClient <tbAppointment> > NewStatusChange(int id, string statuschange, int pagesize = 0, int page = 0)
        {
            string url  = string.Format("api/appointment/newstatuschange?id={0}&statuschange={1}", id, statuschange, pagesize, page);//api/appointment/newstatuschange
            var    data = await ApiRequest <PagedListServer <tbAppointment> > .GetRequest(url);

            var model     = new PagedListClient <tbAppointment>();
            var pagedList = new StaticPagedList <tbAppointment>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
Exemplo n.º 12
0
        public static async Task <PagedListClient <ScheduleBookingViewModel> > list(int docid = 0, int specialityid = 0, string docname = null, DateTime?datetime = null, DateTime?fromtime = null, DateTime?totime = null, int pagesize = 5, int page = 1, int hospitalid = 0)
        {
            string url  = string.Format("api/Booking/list?docid={0}&specialityid={1}&docname={2}&datetime={3}&fromtime={4}&totime={5}&pagesize={6}&page={7}&hospitalid={8}", docid, specialityid, docname, datetime, fromtime, totime, pagesize, page, hospitalid);
            var    data = await ApiRequest <PagedListServer <ScheduleBookingViewModel> > .GetRequest(url);

            var model     = new PagedListClient <ScheduleBookingViewModel>();
            var pagedList = new StaticPagedList <ScheduleBookingViewModel>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
Exemplo n.º 13
0
        //Get Docor List By Schedule Time
        public static async Task <PagedListClient <tbDoctor> > DoctorListByTime(DateTime?fromtime = null, DateTime?totime = null, int pagesize = 0, int page = 0, int hospitalid = 0, int appointmentid = 0, DateTime?date = null)
        {
            string url  = string.Format("api/Booking/DoctorListByTime?fromtime={0}&totime={1}&pagesize={2}&page={3}&hospitalid={4}&appointmentid={5}&date={6}", fromtime, totime, pagesize, page, hospitalid, appointmentid, date);
            var    data = await ApiRequest <PagedListServer <tbDoctor> > .GetRequest(url);

            var model     = new PagedListClient <tbDoctor>();
            var pagedList = new StaticPagedList <tbDoctor>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
        //public static async Task<PagedListClient<DoctorHospitalViewModel>> GetDoctorWithPagingOriginal(string doctorname = null, string hospitalname = null, int pagesize = 10, int page = 1)
        //{
        //    string url = string.Format("api/doctor/listOriginal?doctorname={0}&hospitalname={1}&pagesize={2}&page={3}", doctorname, hospitalname, pagesize, page);
        //    var data = await ApiRequest<PagedListServer<DoctorHospitalViewModel>>.GetRequest(url);

        //    var model = new PagedListClient<DoctorHospitalViewModel>();
        //    var pagedList = new StaticPagedList<DoctorHospitalViewModel>(data.Results, page, pagesize, data.TotalCount);
        //    model.Results = pagedList;
        //    model.TotalCount = data.TotalCount;
        //    model.TotalPages = data.TotalPages;
        //    return model;
        //}

        public static async Task <PagedListClient <DoctorHospitalViewModel> > GetDoctorWithPaging(string doctorname   = null,
                                                                                                  string hospitalname = null, int pagesize = 10, int page = 1, int doctorid = 0, int specialtyid = 0, string specialties = null, int hospitalid = 0)
        {
            string url  = $"api/doctor/list?doctorname={doctorname}&doctorid={doctorid}&specialtyid={specialtyid}&specialties={specialties}&hospitalname={hospitalname}&hospitalid={hospitalid}&pagesize={pagesize}&page={page}";
            var    data = await ApiRequest <PagedListServer <DoctorHospitalViewModel> > .GetRequest(url);

            var model     = new PagedListClient <DoctorHospitalViewModel>();
            var pagedList = new StaticPagedList <DoctorHospitalViewModel>(data.Results, page, pagesize, data.TotalCount);

            model.Results    = pagedList;
            model.TotalCount = data.TotalCount;
            model.TotalPages = data.TotalPages;
            return(model);
        }
Exemplo n.º 15
0
        public async Task <ActionResult> _list(int id = 0, string docname = null, DateTime?fromdate = null, DateTime?todate = null, int pagesize = 10, int page = 1)
        {
            int hospitalid = CareMeClient.Helper.CookieHelper.getstaffHospitalID();

            if (fromdate != null && todate != null)
            {
                ViewBag.appDate = MyExtension.getLocalTime(DateTime.UtcNow);
                PagedListClient <ScheduleDoctorViewModel> result = await ScheduleApiRequestHelper.list(id, docname, fromdate, todate, pagesize, page, hospitalid);

                return(PartialView("_searchList", result));
            }
            else
            {
                ViewBag.appDate = MyExtension.getLocalTime(DateTime.UtcNow);
                PagedListClient <ScheduleDoctorViewModel> result = await ScheduleApiRequestHelper.list(id, docname, fromdate, todate, pagesize, page, hospitalid);

                return(PartialView("_DoctorScheduleList", result));
            }
        }
        public async Task <ActionResult> _newstatusChange(int id, string statuschange = null, int pagesize = 10, int page = 1)
        {
            PagedListClient <tbAppointment> result = await AppointmentApiRequestHelper.NewStatusChange(id, statuschange, pagesize, page);

            return(PartialView("_appointmentBookingList", result));
        }
        public async Task <ActionResult> _hospitalList(string hospitalname = null, int pagesize = 10, int page = 1)
        {
            PagedListClient <tbHospital> result = await HospitalApiRequestHelper.GetHospitalWithPaging(hospitalname, pagesize, page);

            return(PartialView("_hospitalList", result));
        }
Exemplo n.º 18
0
        public async Task <ActionResult> List(int pagesize = 2, int page = 1)
        {
            PagedListClient <Personal> result = await PersonalApiRequestHelper.GetPersonalWithPaging(pagesize, page);

            return(PartialView("_list", result));
        }