protected override void Delete() { TrainingProductManager mgr = new TrainingProductManager(); Entity = new TrainingProduct(); Entity.ProductId = Convert.ToInt32(EventArgument); mgr.Delete(Entity); Get(); base.Delete(); }
private void Delete() { TrainingProduct entity = new TrainingProduct { ProductId = Convert.ToInt32(EventArgument) }; TrainingProductManager.Delete(entity); Get(); ListMode(); }
protected override void Delete() { TrainingProductManager mgr = new TrainingProductManager(); // Create new entity Entity = new TrainingProduct(); // Get primary key from EventArgument Entity.ProductId = Convert.ToInt32(EventArgument); // Call data layer to delete record mgr.Delete(Entity); // Reload the Data Get(); base.Delete(); }