/// <summary>
        /// View doctor detail & schedule
        /// </summary>
        /// <param name="doctorId"></param>
        /// <returns></returns>
        public async Task <ActionResult> DoctorSchedule(string doctorId)
        {
            //get doctor
            var    token  = _userSession.BearerToken;
            string id     = doctorId;
            var    doctor = await GetDoctorDetail(id);

            if (doctor == null)
            {
                doctor = new DoctorProfileViewModel();
            }

            var model = new ScheduleUserViewModel();

            //get schedule of doctor
            var    userId         = doctor.UserId;
            var    start          = DateTime.Now;
            var    end            = DateTime.Now.AddDays(2);
            string apiUrlSchedule = APIProvider.APIGenerator(controllerSchedule, new List <string> {
                nameof(userId),
                nameof(start), nameof(end)
            }, true, userId, start.ToString("yyyy-MM-dd"), end.ToString("yyyy-MM-dd"));
            var schedule = await APIProvider.Authorize_Get <List <ScheduleViewModel> >(token, apiUrlSchedule, APIConstant.API_Resource_CORE);

            model.DoctorProfileViewModel = doctor;
            model.lstScheduleViewModel   = schedule;

            return(PartialView("_DoctorDetail", model));
        }
Exemple #2
0
            public async Task <IActionResult> ProfileSettings(DoctorProfileViewModel model)
            {
                if (ModelState.IsValid)
                {
                    string uniqueFileName = null;

                    if (model.ProfilePhoto != null)
                    {
                        string uploadsFolder = Path.Combine(hostingEnvironment.WebRootPath, "images");
                        //uniqueFileName = Guid.NewGuid().ToString() + "_" + model.ProfilePhoto.FileName;
                        uniqueFileName = Guid.NewGuid().ToString() + "_" + Path.GetFileName(model.ProfilePhoto.FileName);
                        string filePath = Path.Combine(uploadsFolder, uniqueFileName);
                        model.ProfilePhoto.CopyTo(new FileStream(filePath, FileMode.Create));
                    }

                    DoctorProfile dp = new DoctorProfile
                    {
                        id                     = model.id,
                        Title                  = model.Title,
                        FirstName              = model.FirstName,
                        LastName               = model.LastName,
                        SubTitle               = model.SubTitle,
                        ProfilePhoto           = uniqueFileName,
                        facebooklink           = model.facebooklink,
                        twitterlink            = model.twitterlink,
                        linkedin               = model.linkedin,
                        googlepluslink         = model.googlepluslink,
                        rsslink                = model.rsslink,
                        youtubelink            = model.youtubelink,
                        Specializations        = model.Specializations,
                        Designation            = model.Designation,
                        CompanyName            = model.CompanyName,
                        startingDateExperience = model.startingDateExperience,
                        EndingDateExperience   = model.EndingDateExperience,
                        DegreeName             = model.DegreeName,
                        InstituteName          = model.InstituteName,
                        StartingDateStudy      = model.StartingDateStudy,
                        EndingDateStudy        = model.EndingDateStudy,
                        Languages              = model.Languages,
                        AwardTitle             = model.AwardTitle,
                        AwardOccasion          = model.AwardOccasion,
                        AwardDate              = model.AwardDate,
                        MembershipTitle        = model.MembershipTitle,
                        MembershipLocation     = model.MembershipLocation,
                        MembershipDate         = model.MembershipDate,
                        RegistrationID         = model.RegistrationID,
                        RegistrationLocation   = model.RegistrationLocation,
                        RegistrationDate       = model.RegistrationDate,
                        AcceptedInsurance      = model.AcceptedInsurance,
                        VideoIntroduction      = model.VideoIntroduction
                    };

                    //DoctorProfile dc=new DoctorProfile { }
                    _context.Add(dp);
                    await _context.SaveChangesAsync();

                    return(RedirectToAction(nameof(Insights)));
                }
                return(View(model));
            }
Exemple #3
0
        public AddDoctorProfile()
        {
            InitializeComponent();

            this.doctorProfileViewModel = new DoctorProfileViewModel();
            this.DataContext            = this.doctorProfileViewModel;
        }
        /// <summary>
        /// View Doctor detail
        /// </summary>
        /// <param name="doctorId"></param>
        /// <returns></returns>
        public async Task <ActionResult> DoctorDetail(string doctorId)
        {
            string Id     = doctorId;
            var    doctor = await GetDoctorDetail(Id);

            if (doctor == null)
            {
                doctor = new DoctorProfileViewModel();
            }
            return(PartialView("_QuickViewDoctorProfile", doctor));
        }
Exemple #5
0
        public ActionResult DoctorProfile()
        {
            if (Session["userId"] == null)
            {
                return(Redirect("~"));
            }
            var DoctorViewObj = new DoctorProfileView((int)Session["userId"]);
            var viewModel     = new DoctorProfileViewModel
            {
                Doctor    = DoctorViewObj.GetDoctorProfile().Doctor,
                DoctorFee = DoctorViewObj.GetDoctorProfile()
            };

            return(View(viewModel));
        }
        public async Task <ActionResult> SpecialityInfo()
        {
            var departmentController    = "Department";
            var doctorprofileController = "Doctor/" + _userSession.UserId;
            var departments             = await APIProvider.Authorize_Get <List <DepartmentViewModel> >(_userSession.BearerToken, departmentController, APIConstant.API_Resource_CORE, ARS.Get);

            ViewBag.Departments = departments;

            var profile = await APIProvider.Authorize_Get <DoctorProfileViewModel>(_userSession.BearerToken, doctorprofileController, APIConstant.API_Resource_CORE, ARS.Get);

            if (profile == null)
            {
                profile = new DoctorProfileViewModel();
            }
            profile.UserId = _userSession.UserId;

            ViewData["Departments"] = departments;

            return(View(profile));
        }
        public ActionResult DoctorProfile(DoctorProfileViewModel doctorProfileViewModel)
        {
            doctorProfileViewModel = new DoctorProfileViewModel()
            {
                Id         = 1,
                FullName   = "Ricky Martin",
                Email      = "*****@*****.**",
                Address    = "North town",
                Age        = 24,
                BloogGroup = "AB+",
                Gender     = "Male",
                Image      = "http://www.facebook.com",
                Location   = "Kuril Kuratoli",
                NewFee     = 800,
                OldFee     = 500,
                Phone      = "01521434331",
                Specialist = "Cardiology"
            };

            return(View(model: doctorProfileViewModel));
        }
Exemple #8
0
 public ActionResult DoctorUserProfile()
 {
     if (Session["userId"] == null)
     {
         return(Redirect("~"));
     }
     if (TempData["Id"] == null)
     {
         return(RedirectToAction("Doctors"));
     }
     else
     {
         var DoctorViewObj = new DoctorProfileView((int)TempData["Id"]);
         var viewModel     = new DoctorProfileViewModel
         {
             Doctor    = DoctorViewObj.GetDoctorProfile().Doctor,
             DoctorFee = DoctorViewObj.GetDoctorProfile()
         };
         return(View(viewModel));
     }
 }
        public DoctorProfilePage()
        {
            InitializeComponent();

            BindingContext = doctorProfileViewModel = new DoctorProfileViewModel();
        }
 public ActionResult DoDoctorProfile(DoctorProfileViewModel doctorProfileViewModel)
 {
     return(View("DoctorProfile"));
 }
Exemple #11
0
 public ProfileD()
 {
     InitializeComponent();
     DataContext = new DoctorProfileViewModel();
 }