public override int GetHashCode() { int hash = 15; hash = (hash * 7) + Nombre.GetHashCode(); hash = (hash * 7) + Edad.GetHashCode(); return(hash); }
public static Cliente Cliente(string documento, Nombre nombre, string Email, int Usuario_Id) { if (documento == null || nombre == null || Email == "" || Usuario_Id < 1) { throw new Exception("Factories Cliente no puede ser creado"); } return(new Cliente(documento, nombre, Email, Usuario_Id)); }
public override string ToString() { string Contacto = "Nombre: " + Nombre.ToString() + Environment.NewLine + "Apellido paterno: " + ApellidoPaterno.ToString() + Environment.NewLine + "Apellido materno: " + ApellidoMaterno.ToString() + Environment.NewLine + "Edad: " + Edad.ToString() + Environment.NewLine + "Email: " + Email.ToString() + Environment.NewLine + "Teléfono: " + Telefono.ToString() + Environment.NewLine + "Código " + Codigo.ToString() + Environment.NewLine; return(Contacto); }
private void Cancel_Click(object sender, RoutedEventArgs e) { Nombre.Clear(); Telefono.Clear(); Email.Clear(); Entrenador.Clear(); Torneo.SelectedIndex = -1; Campo.SelectedIndex = -1; }
public override int GetHashCode() { unchecked { int hashNombre = (Nombre != null ? Nombre.GetHashCode() : 0); int hashTelefono = (Telefono != null ? Telefono.GetHashCode() : 0); return((hashNombre * 397) ^ (hashTelefono)); } }
public override string ToString() { string per = "Nombre: " + Nombre.ToString() + Environment.NewLine + "Telefono: " + Telefono.ToString() + Environment.NewLine + "Correo: " + Correo.ToString() + Environment.NewLine + "Fecha de Nacimiento: " + Fecha.ToString() + Environment.NewLine; return(per); }
public void ValidarDatos() { if (Nombre.Trim() == "" || HoraComienzo == DateTime.MinValue || HoraFin == DateTime.MinValue) { throw new DatosObligatoriosExcepcion(); } }
/// <summary> /// Obtiene la lista completa de los socios que se tienen registrados en el SIGER /// en la primer etapa de bùsqueda todos los registros tienen Null en el campo Genero /// en la segunda etapa solo se devuelven aquellos que no tuvieron coincidencias en la primera etapa /// </summary> /// <returns></returns> public ObservableCollection <Nombre> GetSociosSiger() { ObservableCollection <Nombre> catalogoTitulares = new ObservableCollection <Nombre>(); string sqlCadena = "select distinct top 500000 * from SociosSiger where genero is null order by dsnombresocio"; SqlConnection connection = new SqlConnection(connectionString); SqlCommand cmd = null; SqlDataReader reader = null; int queRegistro = 0; string folio = String.Empty; try { connection.Open(); cmd = new SqlCommand(sqlCadena, connection); reader = cmd.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { Nombre nombre = new Nombre(); folio = reader["crfme"].ToString(); nombre.Folio = folio; nombre.IdNombre = Convert.ToInt32(reader["IdSocio"]); nombre.NombreDesc = reader["DsNombreSocio"].ToString(); nombre.NombreString = StringUtilities.PrepareToAlphabeticalOrder(nombre.NombreDesc); //nombre.Genero = Convert.ToInt16(reader["Genero"]); //1 - hombre 2 -mujer catalogoTitulares.Add(nombre); } } cmd.Dispose(); reader.Close(); } catch (SqlException ex) { string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name; ErrorUtilities.SetNewErrorMessage(ex, methodName + queRegistro + " Exception,PadronModel" + folio, "Padron"); } catch (Exception ex) { string methodName = System.Reflection.MethodBase.GetCurrentMethod().Name; ErrorUtilities.SetNewErrorMessage(ex, methodName + queRegistro + " Exception,PadronModel" + folio, "Padron"); } finally { connection.Close(); } return(catalogoTitulares); }
public override bool Equals(object obj) { bool igual = false; if (obj is Participante) { igual = Nombre.Equals(((Participante)obj).Nombre); } return(igual); }
public override bool Equals(Object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } Entidad unaEntidad = (Entidad)obj; return(Nombre.Equals(unaEntidad.Nombre)); }
public DiputadoPreferencia(dynamic candidato, dynamic departamentoValue) { Codigo = candidato.ballotCode; Nombre = candidato.ballotName; AbreviaturaPartido = candidato.partyAbbr; Votos = candidato.amount; Departamento = new Departamento(departamentoValue); Nombre = Nombre.Replace("Ñ", "Ñ"); }
public string ToFixedSizeString() { var sb = new StringBuilder(); sb.Append(Nombre.PadLeft(20, 'x')); sb.Append('-'); sb.Append(NumTelefono.ToString().PadLeft(20, '0')); return(sb.ToString()); }
public override string ToString() { string Contacto = "Nombre: " + Nombre.ToString() + Environment.NewLine + "Teléfono: " + Telefono.ToString() + Environment.NewLine + "Email: " + Email.ToString() + Environment.NewLine + "Edad: " + Edad.ToString() + Environment.NewLine + "Codigo: " + Codigo.ToString() + Environment.NewLine; return(Contacto); }
public override bool Equals(object obj) { bool igual = false; if (obj is Deporte) { igual = Nombre.Equals(((Deporte)obj).Nombre); } return(igual); }
public int CompareTo(Jugador other) { int sol = (AdminJugs.GetIdRango(other.Rango).CompareTo(AdminJugs.GetIdRango(Rango))); if (sol == 0) { sol = Nombre.CompareTo(other.Nombre); } return(sol); }
public override bool Equals(object obj) { bool igual = false; if (obj is Equipo) { igual = Nombre.Equals(((Equipo)obj).Nombre); } return(igual); }
public override bool Equals(object obj) { Idioma cmp = obj as Idioma; if (cmp == null) { return(false); } return(Nombre.Equals(cmp.Nombre)); }
public virtual string MostrarPersona() { StringBuilder mensaje = new StringBuilder(); mensaje.Append(" " + Apellido.ToString()); mensaje.AppendLine(", " + Nombre.ToString()); mensaje.AppendLine(", " + Dni.ToString()); return(mensaje.ToString()); }
public override string ToString() { string sep = " ; "; return(Codigo.ToString().PadLeft(15) + sep + Nombre.PadLeft(15) + sep + Apellidos.PadLeft(15) + sep + FechaNacimiento.ToShortDateString().PadLeft(15) + sep + SueldoAnual.ToString().PadLeft(10)); }
public virtual string Listar() { StringBuilder sb = new StringBuilder(); sb.Append(" " + Apellido.ToString()); sb.AppendLine(", " + Nombre.ToString()); // sb.AppendLine(Responsable.ToString()); return(sb.ToString()); }
private Beneficiario getBeneficiario(BeneficiarioRequest beneficiarioRequest) { var nombre = new Nombre(beneficiarioRequest.nombreRequest.nombres, beneficiarioRequest.nombreRequest.primerApellido, beneficiarioRequest.nombreRequest.segundoApellido); var beneficiario = new Beneficiario(new Identidad(beneficiarioRequest.identidadRequest.identidad), nombre, beneficiarioRequest.fechaNacimiento); return(beneficiario); }
private void FrmVisorReporteProveedores_Load(object sender, EventArgs e) { SqlConnection ocon = new SqlConnection("Data Source=ana-alex-brian.database.windows.net;Initial Catalog=Cuentas_por_pagar;Persist Security Info=True;User ID=propietaria;Password=#Seguridad1"); ocon.Open(); string sSQL = "select * from Proveedores where 1 = 1"; if (Nombre.Trim().Length > 0) { sSQL += " and Nombre LIKE '%" + Nombre + "%'"; } if (TipoPersona.Trim().Length > 0) { sSQL += " and Tipo_Persona = '" + TipoPersona + "'"; } if (Estado.Trim().Length > 0) { sSQL += " and Estado = '" + Estado + "'"; } if (BalanceDesde > 0 && BalanceHasta > 0) { sSQL += " and Balance between " + BalanceDesde + " and " + BalanceHasta; } else if (BalanceDesde > 0) { sSQL += " and Balance > " + BalanceDesde; } else if (BalanceHasta > 0) { sSQL += " and Balance < " + BalanceHasta; } DataTable odt = new DataTable(); SqlDataAdapter oda = new SqlDataAdapter(sSQL, ocon); oda.Fill(odt); ReportDataSource rds = new ReportDataSource(); rds.Value = odt; rds.Name = "DataSetProveedores"; rpvReporteProveedores.LocalReport.DataSources.Clear(); rpvReporteProveedores.LocalReport.DataSources.Add(rds); rpvReporteProveedores.LocalReport.ReportEmbeddedResource = "ReporteProveedores.rdlc"; rpvReporteProveedores.LocalReport.ReportPath = @"../../ReporteProveedores.rdlc"; rpvReporteProveedores.RefreshReport(); // TODO: This line of code loads data into the 'CuentasPorPagarDataSet.Proveedores' table. You can move, or remove it, as needed. //this.ProveedoresTableAdapter.Fill(this.CuentasPorPagarDataSet.Proveedores); //this.reportViewer1.RefreshReport(); }
public string ToFixedSizeString() { StringBuilder sb = new StringBuilder(); sb.Append(Id.ToString().PadLeft(2, '0')); sb.Append('|'); sb.Append(Nombre.PadLeft(20, '\0')); sb.Append('|'); sb.Append(Precio.ToString().PadLeft(5, '0')); return(sb.ToString()); }
public override bool Equals(object obj) { if (!(obj == null) && obj is UsuarioBEL) { return(Nombre.Equals(((UsuarioBEL)obj).Nombre)); } else { return(false); } }
private void button1_Click(object sender, EventArgs e) { cadena("Insert into usuarios(cedula,nombre,apellido,direccion,telefono,fecha) values('" + Cedula.Text + "','" + Nombre.Text + "','" + Apellido.Text + "','" + Direccion.Text + "','" + Telefono.Text + "','" + fecha.Text + "')"); MessageBox.Show("Guardado"); Nombre.Clear(); Apellido.Clear(); Cedula.Clear(); Direccion.Clear(); Telefono.Clear(); cargar_datos(); }
public override bool Equals(Object obj) { if (obj == null || GetType() != obj.GetType()) { return(false); } Sentimiento unSentimiento = (Sentimiento)obj; return((Nombre.Equals(unSentimiento.Nombre)) && ((TipoDeSentimiento.Equals(unSentimiento.TipoDeSentimiento)))); }
public bool Contiene(string textoABuscar) { bool encontrado = false; if (Nombre.ToUpper().Contains(textoABuscar.ToUpper()) || (descripcion.ToUpper().Contains(textoABuscar.ToUpper()))) { encontrado = true; } return(encontrado); }
public override int GetHashCode() { //Get hash code for the Name field if it is not null. int hashProductName = Nombre == null ? 0 : Nombre.GetHashCode(); //Get hash code for the Code field. int hashProductCode = Id.GetHashCode(); //Calculate the hash code for the product. return(hashProductName ^ hashProductCode); }
private bool Validacion() { if (Nombre.Text.Length == 0) { MessageBox.Show("Debes Digitar un Nombre de Cliente"); Nombre.Focus(); return(false); } return(true); }
public bool IsEmpty() { bool value = false; if (Id == null && Nombre.IsNull() && NombreLogico.IsNull()) { value = true; } return(value); }