private void MyCmdSave_Click() { try { bool myUpDate = false; string myWhere = string.Empty; if (!_IsInsert) { myWhere = cbNotario_Item.Split('-')[0]; } else { myWhere = ""; } using (SqlExcuteCommand mySqlExe = new SqlExcuteCommand() { DBCnnStr = DBEndososCnnStr }) { myUpDate = mySqlExe.MyChangeNotario(_IsInsert, txtNumElec, txtNombreAspirante.Split('-')[0], txtNombreAspirante.Split('-')[1], txtNombre, txtApellido1, txtApellido2, txtStatusElec, dpFchInformadoAlaCEE, WhatIsModo, myWhere); } if (!myUpDate) { throw new Exception("Error en la Base de Data"); } MessageBox.Show("Done...", "Save", MessageBoxButton.OK, MessageBoxImage.Information); _LogClass.MYEventLog.WriteEntry("Save..." + txtNumElec, EventLogEntryType.Information, 100); } catch (Exception ex) { MethodBase site = ex.TargetSite; MessageBox.Show(ex.ToString(), site.Name, MessageBoxButton.OK, MessageBoxImage.Error); _LogClass.MYEventLog.WriteEntry(string.Concat(ex.Message, "\r\n", site.Name), EventLogEntryType.Error, 9999); } finally { MyRefresh(); MyReset(); } }