示例#1
0
        public ActionResult Delete(int id, FormCollection form)
        {
            var data = repo.Where(p => p.Id == id).FirstOrDefault();

            repo.Delete(data);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶聯絡人 contact = contactRepo.Find(id);

            contactRepo.Delete(contact);
            contactRepo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
示例#3
0
        public ActionResult DeleteConfirmed(int id)
        {
            var CC = ClientContact.Get單一筆客戶聯絡人資料(id);

            ClientContact.Delete(CC);
            ClientContact.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶聯絡人 l_ContactPerson = repo.Find(id);

            repo.Delete(l_ContactPerson);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        // GET: 客戶聯絡人/Delete/5
        public ActionResult Delete(int?id)
        {
            var 客戶聯絡人 = repo.Get單筆資料ByID(id.Value);

            repo.Delete(客戶聯絡人);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            var contactor = repo.Find(id);

            repo.Delete(contactor);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶聯絡人 客戶聯絡人 = repo聯絡.Find(id);

            repo聯絡.Delete(客戶聯絡人);
            repo聯絡.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
示例#8
0
        public ActionResult DeleteConfirmed(int id)
        {
            var data = repo.GetClientContact(id);

            repo.Delete(data);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
示例#9
0
        public ActionResult DeleteConfirmed(int id)
        {
            var 聯絡人 = _客戶聯絡人Repository.Find(id);

            _客戶聯絡人Repository.Delete(聯絡人);

            _客戶聯絡人Repository.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
示例#10
0
        public ActionResult DeleteConfirmed(int id)
        {
            客戶聯絡人 客戶聯絡人 = repoContact.GetOne客戶聯絡人(id);

            repoContact.Delete(客戶聯絡人);

            repoContact.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            var data = _repoCustomerContact.GetSingleRecordByCustomerContactId(id);

            _repoCustomerContact.Delete(data);
            _repoCustomerContact.UnitOfWork.Commit();

            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶聯絡人 客戶聯絡人 = db.Find(id);

            db.Delete(客戶聯絡人);
            db.UnitOfWork.Commit();
            //db.客戶聯絡人.Remove(客戶聯絡人);
            //db.SaveChanges();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            客戶資料 客戶資料 = 客戶資料Repo.Find(id);

            客戶銀行資訊Repo.Delete(客戶資料.Id);
            客戶聯絡人Repo.Delete(客戶資料.Id);

            客戶資料Repo.Delete(客戶資料);
            客戶資料Repo.UnitOfWork.Commit();

            return(RedirectToAction("Index"));
        }
示例#14
0
        public ActionResult DeleteConfirmed(int id)
        {
            //客戶聯絡人 客戶聯絡人 = db.客戶聯絡人.Find(id);
            ////db.客戶聯絡人.Remove(客戶聯絡人);
            //客戶聯絡人.是否已刪除 = true;
            //db.SaveChanges();
            客戶聯絡人 客戶聯絡人 = repo.Find(id);

            repo.Delete(客戶聯絡人);
            repo.UnitOfWork.Commit();
            return(RedirectToAction("Index"));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            //客戶聯絡人 客戶聯絡人 = db.客戶聯絡人.Find(id);
            //db.客戶聯絡人.Remove(客戶聯絡人);
            //db.SaveChanges();
            客戶聯絡人 客戶聯絡人 = repo.All().FirstOrDefault(p => p.Id == id);

            repo.Delete(客戶聯絡人);
            repo.UnitOfWork.Commit();

            return(RedirectToAction("Index"));
        }
示例#16
0
        public ActionResult Delete(int id)
        {
            if (ModelState.IsValid)
            {
                var tmp = repo.FindById(id);
                repo.Delete(tmp);
                repo.UnitOfWork.Commit();

                return(RedirectToAction("List"));
            }

            return(View(repo.FindById(id)));
        }
        public ActionResult DeleteConfirmed(int id)
        {
            //客戶聯絡人 客戶聯絡人 = db.客戶聯絡人.Find(id);
            //db.客戶聯絡人.Remove(客戶聯絡人);
            //客戶聯絡人.是否已刪除 = true;
            客戶聯絡人 客戶聯絡人 = repo.Get單筆資料ById(id);

            try
            {
                //db.SaveChanges();
                repo.Delete(客戶聯絡人);
                repo.UnitOfWork.Commit();
            }
            catch (DbEntityValidationException ex)
            {
                throw ex;
            }
            return(RedirectToAction("Index"));
        }
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            客戶聯絡人 data = repo.Find(id.Value);

            if (data != null)
            {
                // data.IsDelete = true;
                repo.Delete(id.Value);
                repo.UnitOfWork.Commit();
                return(RedirectToAction("Index"));
            }
            //repo.Remove(data);
            //repo.UnitOfWork.Commit();

            return(RedirectToAction("Index"));
        }
示例#19
0
        public ActionResult DeleteConfirm(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            var data = repoContact.GetContactById(id.Value);

            if (data != null)
            {
                repoContact.Delete(data);
                repoContact.UnitOfWork.Commit();

                return(RedirectToAction("Index"));
            }
            else
            {
                return(HttpNotFound());
            }
        }
 public ActionResult DeleteConfirmed(int id)
 {
     repo.Delete(id);
     return(RedirectToAction("Index"));
 }