Beispiel #1
0
        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();
                }
            }
        }
Beispiel #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);
        }
Beispiel #4
0
 public int Delete(int id)
 {
     return(_designationRepo.Delete(id));
 }
Beispiel #5
0
        public async Task <IActionResult> DeleteConfirmed(string id)
        {
            await _context.Delete(id);

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