Exemplo n.º 1
0
 private void OnRowUpdating(object sender, MySqlRowUpdatingEventArgs e)
 {
     if ((int)e.Status != 0)
     {
         return;
     }
     if (this._schema == null)
     {
         this.GenerateSchema();
     }
     if ((StatementType)3 == e.StatementType)
     {
         e.Command = this.CreateDeleteCommand();
     }
     else if ((StatementType)2 == e.StatementType)
     {
         e.Command = this.CreateUpdateCommand();
     }
     else if ((StatementType)1 == e.StatementType)
     {
         e.Command = this.CreateInsertCommand();
     }
     else if ((int)e.StatementType == 0)
     {
         return;
     }
     MySqlCommandBuilder.SetParameterValues(e.Command, e.Row);
 }