public bool UpdateStatus(string doctorId, DoctorStatus status)
 {
     if (Exists(doctorId))
     {
         Doctor doctor = Read(doctorId);
         var    query  = string.Format("UPDATE DoctorRepository SET DoctorName='{0}', DoctorStatus='{1}', Phone='{2}',DoctorAddress='{3}',Department='{4}',EmailId='{5}' WHERE DoctorId='{6}'", doctor.Name, (int)status, doctor.Phone, doctor.Address, (int)doctor.Department, doctor.Email, doctor.DoctorId);
         return(SqlCommands.ExecuteCommand(query, conString));
     }
     return(false);
 }
        public DoctorViewModel CreateDoctor(String name = "NoName", DoctorStatus status = DoctorStatus.NotWork, PersonSex sex = PersonSex.Male)
        {
            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            return(new DoctorViewModel()
            {
                Name = name,
                Sex = sex,
                Status = status
            });
        }
Exemplo n.º 3
0
 public void UpdateDoctorStatus(string doctorId, DoctorStatus status)
 {
     m_doctorRepo.UpdateStatus(doctorId, status);
 }