Exemple #1
0
        //This function must be removed
        private void UpdateDoctorList(DocAvaliable doctors)
        {
            var index = Doctors.IndexOf(doctors);

            //updating method
            Doctors.Remove(doctors);
            //Or you can clear the list each time and just add everything back
            Doctors.Insert(index, doctors);
        }
Exemple #2
0
        public async Task <ActionResult> Delete(string id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            DocAvaliable _docAvaliable = await DocumentDBRepository <DocAvaliable> .GetItemAsync(id);

            if (_user == null)
            {
                return(HttpNotFound());
            }

            return(View(_docAvaliable));
        }
Exemple #3
0
//This function must be removed
        public void HideOrShowProfile(DocAvaliable doctors)
        {
            if (_oldDoctorSelected == doctors)
            {
                // click twice on the same item will hide it
                doctors.IsVisible = !doctors.IsVisible;
                UpdateDoctorList(doctors);
            }
            else
            {
                if (_oldDoctorSelected != null)
                {
                    // hide previous selected item
                    _oldDoctorSelected.IsVisible = false;
                    UpdateDoctorList(_oldDoctorSelected);
                }
                // show selected item
                doctors.IsVisible = true;
                UpdateDoctorList(doctors);
            }

            _oldDoctorSelected = doctors;
        }
Exemple #4
0
        public async Task <ActionResult> DeleteConfirmed(string id)
        {
            DocAvaliable _docAvaliable = await DocumentDBRepository <Movie> .GetItemAsync(id);

            await DocumentDBRepository <DocAvaliable> .RemoveItemAsync(_docAvaliable.Id, _docAvaliable);
        }