コード例 #1
0
        public void DeleteDoctor()
        {
            Doctor Doctor = new Doctor()
            {
                DoctorId = 124,
            };

            DoctorManager DoctManager  = new DoctorManager();
            var           DeleteDoctor = DoctManager.DeleteDoctor(Doctor);
        }
コード例 #2
0
 protected void CancelDelete()
 {
     progress = ProgressDialog.Show(this, "Обработка...", "Пожалуйста, подождите.", true);
     if (doctor.ID != 0)
     {
         DoctorManager.DeleteDoctor(doctor.ID);
     }
     progress.Dismiss();
     Finish();
 }
コード例 #3
0
        protected void doctorGridView_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            string contactNo = null;

            if (e.CommandName == "DeleteRow")
            {
                contactNo = e.CommandArgument.ToString();
            }
            aDoctorManager.DeleteDoctor(contactNo);
            PopulateGridView();
        }
コード例 #4
0
        public ActionResult DeleteDoctor(Doctor delDoctor)
        {
            if (delDoctor.DoctorID == null || delDoctor.DoctorID.Length == 0)
            {
                ViewBag.message = "Error: An ID is required";
                return(View(delDoctor));
            }
            bool result = DoctorManager.DeleteDoctor(delDoctor);

            if (result == false)
            {
                ViewBag.message = "Error: ID is wrong";
                return(View(delDoctor));
            }
            ViewBag.message = "Doctor deleted";
            Doctor[] doctors = DoctorManager.GetAllDoctors();
            return(View("List", doctors));
        }
コード例 #5
0
        public override bool OnContextItemSelected(IMenuItem item)
        {
            var info = (AdapterView.AdapterContextMenuInfo)item.MenuInfo;

            switch (item.ItemId)
            {
            case MENU_ITEM_EDIT:
                var doctorDetails = new Intent(this, typeof(DoctorDetailsActivity));
                doctorDetails.PutExtra("DoctorID", doctors[info.Position].ID);
                StartActivity(doctorDetails);
//					ContextItemClicked(item.TitleFormatted.ToString());
                break;

            case MENU_ITEM_DELETE:
                DoctorManager.DeleteDoctor(doctors [info.Position].ID);
//					ContextItemClicked (item.TitleFormatted.ToString ());
                RefreshList();
                break;
            }
            return(base.OnOptionsItemSelected(item));
        }