protected void ValidarDestinatarioFrecuentePara(Tratamiento Tratamiento, string Valor) { if (Valor.Equals(string.Empty)) { if (Tratamiento.ToString() == "Add") { throw new Exception("Destinatario frecuente no agregado: campo 'Para' sin informar"); } else { throw new Exception("Destinatario frecuente no actualizado: campo 'Para' sin informar"); } } try { RN.Funciones.ValidarListaDeMails(Valor); } catch (Exception ex) { if (Tratamiento.ToString() == "Add") { throw new Exception("Destinatario frecuente no agregado: " + ex.Message + "º dirección de email, en campo 'Para', con formato inválido"); } else { throw new Exception("Destinatario frecuente no actualizado: " + ex.Message + "º dirección de email, en campo 'Para', con formato inválido"); } } }
protected void ValidarDestinatarioFrecuenteId(Tratamiento Tratamiento, string Valor) { if (Valor.Equals(string.Empty)) { if (Tratamiento.ToString() == "Add") { throw new Exception("Destinatario frecuente no agregado: campo 'Id' sin informar"); } else { throw new Exception("Destinatario frecuente no actualizado: campo 'Id' sin informar"); } } }
protected void ValidarDestinatarioFrecuenteCc(Tratamiento Tratamiento, string Valor) { if (!Valor.Equals(string.Empty)) { try { RN.Funciones.ValidarListaDeMails(Valor); } catch (Exception ex) { if (Tratamiento.ToString() == "Add") throw new Exception("Destinatario frecuente no agregado: " + ex.Message + "º dirección de email, en campo 'Cc', con formato inválido"); else throw new Exception("Destinatario frecuente no actualizado: " + ex.Message + "º dirección de email, en campo 'Cc', con formato inválido"); } } }
protected void ValidarDestinatarioFrecuenteId(Tratamiento Tratamiento, string Valor) { if (Valor.Equals(string.Empty)) { if (Tratamiento.ToString() == "Add") throw new Exception("Destinatario frecuente no agregado: campo 'Id' sin informar"); else throw new Exception("Destinatario frecuente no actualizado: campo 'Id' sin informar"); } }