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(); } } }
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); }
public int Delete(int id) { return(_designationRepo.Delete(id)); }
public async Task <IActionResult> DeleteConfirmed(string id) { await _context.Delete(id); return(RedirectToAction(nameof(Index))); }
public int DeleteProductImage(SqlConnection con, IDbTransaction transaction, int id) { return(_productImageRepo.Delete(id, transaction, con)); }
public int DeletePrice(int id) { return(_productPriceRepo.Delete(id)); }
public int Delete(int id) { return(_productRepo.Delete(id)); }
public int Delete(int id) { return(_departmentRepo.Delete(id)); }
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())); }
public int Delete(int id) { return(_roleRepo.Delete(id)); }
public int Delete(int id) { return(_accountHeadRepo.Delete(id)); }
public int Delete(int id) { return(_supplierRepo.Delete(id)); }
/// <summary> /// 根据实体删除一条数据 /// </summary> /// <param name="entity">实体类</param> /// <returns></returns> public async Task <bool> Delete(T entity) { return(await BaseDal.Delete(entity)); }
public int Delete(int id) { return(_unitRepo.Delete(id)); }
public int Delete(Recipient recipient) { return(_repository.Delete(recipient.ToEntity())); }