/// <summary> /// Handles the Entity Deleted Event of the LLBLGenProDataSource /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void CustomersDS_EntityDeleted(object sender, SD.LLBLGen.Pro.ORMSupportClasses.DataSourceActionEventArgs e) { CustomerEntity customer = ((CustomerEntity)e.InvolvedEntity); // check if the entity was deleted, by checking the entity.Fields.State field. if (customer.Fields.State == EntityState.Deleted) { Message.Text = "The record was successfully deleted"; } else { Message.Text = "Customer with ID = " + customer.CustomerId + " could not be deleted"; } }
/// <summary> /// Handles the Entity Updated Event of the LLBLGenProDataSource /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void CustomersDS_EntityUpdated(object sender, SD.LLBLGen.Pro.ORMSupportClasses.DataSourceActionEventArgs e) { CustomerEntity customer = ((CustomerEntity)e.InvolvedEntity); Message.Text = "Customer with ID = " + customer.CustomerId + " was successfully updated"; }