Exemplo n.º 1
0
        public ActionResult ViewDoctorProfile(int?Id)
        {
            DoctorProfileVM dpv = new DoctorProfileVM();

            if (Id != null)
            {
                var data = (from d in db.Doctors
                            join c in db.Chambers on d.ID equals c.DoctorID
                            join s in db.Schedules on c.ID equals s.ChamberID
                            join h in db.Hospitals on c.HospitalID equals h.Id
                            select new DoctorList()
                {
                    DoctorId = d.ID,
                    DoctorName = d.Name,
                    DoctorDesignation = d.Designation,
                    DoctorSpec = d.speciality.Name,
                    HospitalName = h.Name,
                    ChamberCity = h.City.Name,
                    ChamberArea = h.Area.Name,
                    Fee = s.FirstAppointmentFee,
                    Gender = d.Gender
                });
                var Docor = data.Where(d => d.DoctorId == Id).FirstOrDefault();
                dpv.DoctorList = Docor;


                var Schedule = db.Schedules.Where(s => s.DoctorID == Id).ToList();
                dpv.Schedules = Schedule;

                return(View(dpv));
            }
            return(View());
        }
Exemplo n.º 2
0
        public ApiResultModel UpdateDoctorProfileWithAllValues(DoctorProfileVM model)
        {
            var strContent = JsonConvert.SerializeObject(model);
            var request    = ApiConsumerHelper.PostData("api/updateDoctorProfileWithAllValues?doctorID=" + model.DoctorID, strContent);

            var result = JsonConvert.DeserializeObject <ApiResultModel>(request);

            return(result);
        }
Exemplo n.º 3
0
        public string SaveDoctorProfile(DoctorProfileVM oModel)
        {
            try
            {
                oModel.ConvertBase64ToByteArray();
                var oRetMsg = oProfileRepository.UpdateDoctorProfileWithAllValues(oModel);

                SessionHandler.ProfilePhoto   = oModel.ProfilePhotoBase64;
                SessionHandler.UserInfo.title = oModel.TitleName;
                var timezone = oProfileRepository.GetDoctorTimeZone(SessionHandler.UserId);
                SessionHandler.UserInfo.timeZone       = timezone.zonename;
                SessionHandler.UserInfo.timeZoneOffset = timezone.zoneoffset;
                return(oRetMsg.message);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Exemplo n.º 4
0
 public string SaveSecretAnswers(DoctorProfileVM oModel)
 {
     try
     {
         var oRetMsg = oProfileRepository.AddUpdateDoctorSecretAnswers(new UpdateSecretQuestions
         {
             secretanswer1   = oModel.SectetAnswer1,
             secretanswer2   = oModel.SectetAnswer2,
             secretanswer3   = oModel.SectetAnswer3,
             secretquestion1 = oModel.SectetQuestion1,
             secretquestion2 = oModel.SectetQuestion2,
             secretquestion3 = oModel.SectetQuestion3,
             doctorID        = SessionHandler.UserInfo.Id
         });
         return(oRetMsg.message);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }