예제 #1
0
파일: UCBase.cs 프로젝트: K8rvin/NailNotes
        private void barButtonItemDelete_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            var selected = gridViewBase.GetFocusedRow() as BaseBl;

            if (selected != null)
            {
                if (MessageBox.Show($"Удалить базу {selected.Name} ?", "Внимание", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    _repo.Delete(selected.Id);
                    _items.Remove(selected);
                    gridViewBase.RefreshData();
                }
            }
        }
예제 #2
0
        public async Task <IActionResult> Delete(string id)
        {
            if (id == null)
            {
                return(NotFound());
            }

            var studentModel = await _context.Get(id);

            if (studentModel == null)
            {
                return(NotFound());
            }
            await _context.Delete(id);

            return(Ok());
        }
        public virtual MessageObject <T> Remove(T entity)
        {
            MessageObject <T> validationResult = ValidateRemove(entity);

            try
            {
                BasePreProcessing(ref entity, OperationType.Remove);
                if (validationResult.ProcessingStatus)
                {
                    repo.Delete(entity);
                    repo.Commit();

                    BasePostProcessing(ref entity, OperationType.Add);
                }
            }
            catch (Exception ex)
            {
                Utils.Logger.Log(ex, logSource);
                validationResult.AddException(ex);
            }
            return(validationResult);
        }
예제 #4
0
 public int Delete(int id)
 {
     return(_designationRepo.Delete(id));
 }
예제 #5
0
        public async Task <IActionResult> DeleteConfirmed(string id)
        {
            await _context.Delete(id);

            return(RedirectToAction(nameof(Index)));
        }
예제 #6
0
 public int DeleteProductImage(SqlConnection con, IDbTransaction transaction, int id)
 {
     return(_productImageRepo.Delete(id, transaction, con));
 }
예제 #7
0
 public int DeletePrice(int id)
 {
     return(_productPriceRepo.Delete(id));
 }
예제 #8
0
 public int Delete(int id)
 {
     return(_productRepo.Delete(id));
 }
예제 #9
0
 public int Delete(int id)
 {
     return(_departmentRepo.Delete(id));
 }
예제 #10
0
 public int Delete(Host host)
 {
     return(_repository.Delete(host.ToEntity()));
 }
예제 #11
0
 public int Delete(SqlConnection con, IDbTransaction transaction, int id)
 {
     return(_fiscalYearRepo.Delete(id, transaction, con));
 }
예제 #12
0
 public int Delete(Sender sender)
 {
     return(_repository.Delete(sender.ToEntity()));
 }
예제 #13
0
 public int Delete(int id)
 {
     return(_roleRepo.Delete(id));
 }
예제 #14
0
 public int Delete(int id)
 {
     return(_accountHeadRepo.Delete(id));
 }
예제 #15
0
 public int Delete(int id)
 {
     return(_supplierRepo.Delete(id));
 }
예제 #16
0
파일: BaseSvc.cs 프로젝트: xudahe/Xu.Core
 /// <summary>
 /// 根据实体删除一条数据
 /// </summary>
 /// <param name="entity">实体类</param>
 /// <returns></returns>
 public async Task <bool> Delete(T entity)
 {
     return(await BaseDal.Delete(entity));
 }
예제 #17
0
 public int Delete(int id)
 {
     return(_unitRepo.Delete(id));
 }
예제 #18
0
 public int Delete(Recipient recipient)
 {
     return(_repository.Delete(recipient.ToEntity()));
 }