예제 #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);
        }
예제 #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));
        }
예제 #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;
        }
예제 #4
0
        public async Task <ActionResult> DeleteConfirmed(string id)
        {
            DocAvaliable _docAvaliable = await DocumentDBRepository <Movie> .GetItemAsync(id);

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