Пример #1
0
 //public string List()
 //{
 //    string todos = "";
 //    foreach (Vendedor vendedor in ListaVendedor)
 //    {
 //        todos += vendedor.ToString();
 //    }
 //    return todos;
 //}
 /// <summary>
 /// Muestra los datos de un vendedor
 /// </summary>
 public void Show()
 {
     Console.WriteLine(Cedula.ToString().PadRight(12) + Nombre.PadRight(35) + FechaNacimiento.ToShortDateString().PadLeft(12) +
                       Sexo.ToString().PadRight(12).PadLeft(15) + Telefono.ToString().PadLeft(12).PadRight(15) + Correo.PadRight(40) + Direccion.PadRight(40) +
                       EstadoCivil.ToString().PadRight(12) + IdVendedor.ToString().PadLeft(5) + FechaIngreso.ToShortDateString().PadLeft(12) +
                       Salario.ToString().PadLeft(10) + Profesion.PadLeft(20).PadRight(17) + Calificacion.ToString().PadLeft(5));
 }
Пример #2
0
 private void BtnEliminarT_Click(object sender, EventArgs e)
 {
     if (dgvTelefonos.SelectedCells.Count > 0)
     {
         TelefonoNegocio neg = new TelefonoNegocio();
         Telefono        em  = (Telefono)dgvTelefonos.CurrentRow.DataBoundItem;
         try
         {
             using (var popup = new Confirmacion(@"eliminar """ + em.ToString() + @""""))
             {
                 var R = popup.ShowDialog();
                 if (R == DialogResult.OK)
                 {
                     bool conf = popup.R;
                     if (em != null && conf == true)
                     {
                         neg.EliminarLogico(em.IdTelefono);
                         LlenarTablaT();
                     }
                 }
             }
         }
         catch (Exception ex)
         {
             Mensaje m = new Mensaje(ex.ToString()); m.ShowDialog();
         }
     }
     else
     {
         Mensaje m = new Mensaje("Ningun item seleccionado.");
         m.ShowDialog();
     }
 }
Пример #3
0
 public override string ToString()
 {
     return(IdVendedor.ToString() + "\t" + Cedula.ToString() + "\t" + Nombre + "\t" + FechaNacimiento.ToShortDateString() + "\t" +
            Sexo.ToString() + "\t" + Telefono.ToString() + "\t" + Correo + "\t" + Direccion + "\t" +
            EstadoCivil.ToString() + "\t" + FechaIngreso.ToShortDateString() + "\t" +
            Salario.ToString() + "\t" + Profesion + "\t" + Calificacion.ToString());
 }
Пример #4
0
        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);
        }
Пример #5
0
        private void Save()
        {
            System.IO.StreamWriter writer = new System.IO.StreamWriter("Files/Cliente.txt", true);

            writer.WriteLine(Cedula.ToString() + "," + Nombre + "," + FechaNacimiento.ToShortDateString() + "," +
                             Sexo.ToString() + "," + Telefono.ToString() + "," + Correo + "," + Direccion + "," +
                             EstadoCivil.ToString() + "," + IdCliente.ToString());

            writer.Close();
        }
Пример #6
0
        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);
        }
Пример #7
0
        public override string ToString()
        {
            string per = "Código: " + codigo.ToString() + Environment.NewLine
                         + "Nombre: " + nombre.ToString() + Environment.NewLine
                         + "Telefono: " + Telefono.ToString() + Environment.NewLine
                         + "Correo: " + Correo.ToString() + Environment.NewLine
                         + "Fecha: " + Fecha.ToString() + Environment.NewLine;

            return(per);
        }
Пример #8
0
        private void Save()
        {
            System.IO.StreamWriter writer = new System.IO.StreamWriter("Files/Vendedor.txt", true);

            writer.WriteLine(Cedula.ToString() + "," + Nombre + "," + FechaNacimiento.ToShortDateString() + "," +
                             Sexo.ToString() + "," + Telefono.ToString() + "," + Correo + "," + Direccion + "," +
                             EstadoCivil.ToString() + "," + IdVendedor.ToString() + "," + FechaIngreso.ToShortDateString() + "," +
                             Salario.ToString() + "," + Profesion + "," + Calificacion.ToString());

            writer.Close();
        }
Пример #9
0
 public bool Update()
 {
     try
     {
         Libercon.Datos.Usuario usu = Conexion.LiberEntities.Usuario.First(n => n.UsuarioID == IdUsuario);
         usu.UsuarioID = IdUsuario;
         usu.Rut       = _rut.ToString();
         usu.Dv        = _dv;
         usu.Nombre    = Nombre;
         usu.Correo    = Correo;
         usu.Telefono  = Telefono.ToString();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
Пример #10
0
 // public string DocumentoInstructor,Nombre1,Apellido1,Direccion1,Telefono1,Celular1,Profesion1,Estado1;
 public void  MetodoInstructor(string DocumentoInstructor)
 {
     try
     {
         ConnectionBD  Puente;
         SqlCommand    Comando;
         SqlDataReader Lector;
         Puente  = new ConnectionBD();
         Comando = new SqlCommand("select * from Instructor where DocumentoInstructor='" + DocumentoInstructor + "'", Puente.RetornarConnexion());
         Lector  = Comando.ExecuteReader();
         while (Lector.Read())
         {
             Nombre    = Lector.GetString(1);
             Apellido  = Lector.GetString(2);
             Direccion = Lector.GetString(3);
             Telefono  = Lector.GetString(4);
             Celular   = Lector.GetString(5);
             Profesion = Lector.GetString(6);
             Estado    = Lector.GetString(7);
         }
         Nombre.ToString();
         Apellido.ToString();
         Direccion.ToString();
         Telefono.ToString();
         Celular.ToString();
         Profesion.ToString();
         Estado.ToString();
         Lector.Close();
         Comando.Dispose();
         Puente.CerrarConnexion();
     }
     catch (Exception ex)
     {
         MessageBox.Show("El Instructor no existe");
     }
 }
Пример #11
0
 public override string ToString()
 {
     return(Cedula.ToString() + "\t" + Nombre + "\t" + FechaNacimiento.ToShortDateString() + "\t" +
            Sexo.ToString() + "\t" + Telefono.ToString() + "\t" + Correo + "\t" + Direccion + "\t" +
            EstadoCivil.ToString() + "\t" + IdCliente.ToString());
 }
Пример #12
0
        //public string List()
        //{
        //    string todos = "";
        //    foreach (Cliente Cliente in ListaClientes)
        //    {
        //        todos += Cliente.ToString();
        //    }
        //    return todos;
        //}

        /// <summary>
        /// Muestra los datos de un Cliente
        /// </summary>
        public void Show()
        {
            Console.WriteLine(Cedula.ToString().PadRight(12) + Nombre.PadRight(35) + FechaNacimiento.ToShortDateString().PadLeft(12) +
                              Sexo.ToString().PadRight(12).PadLeft(15) + Telefono.ToString().PadLeft(12).PadRight(15) + Correo.PadRight(40) + Direccion.PadRight(40) +
                              EstadoCivil.ToString().PadRight(12) + IdCliente.ToString().PadLeft(5));
        }
Пример #13
0
 public override string ToString()
 {
     return(Identificacion + "\\\\" + Nombre + "\\\\" + Direccion + "\\\\" + Telefono.ToString());
 }
Пример #14
0
 public string mostrarCliente()
 {
     return(Identificacion + Nombre + Direccion + Telefono.ToString());
 }
Пример #15
0
        public bool Actualizar(int id)
        {
            bool Success = false;

            id = id_Proveedor;

            try
            {
                conexion.abrir();

                string sql = "UPDATE Proveedor SET nombre = '" + Nombre.ToString() + "',CorreoE ='" + CorreoE.ToString() + "', telefono ='" + Telefono.ToString() + "'";
                sql += "WHERE id_Proveedor = " + id;

                var cmd       = new SqlCommand(sql, conexion.Conectar);
                var resultado = cmd.ExecuteNonQuery();

                if (resultado == 1)
                {
                    Success = true;
                }

                conexion.cerrar();
            }
            catch (Exception)
            {
                throw;
            }
            return(Success);
        }
Пример #16
0
        protected void btnActualizar_Click(object sender, EventArgs e)
        {
            Nombre     = txtNombre.Text;
            Apellidos  = txtApellidos.Text;
            Telefono   = txtTel.Text;
            Matricula  = txtMatricula.Text;
            Contraseña = txtContra.Text;
            area       = int.Parse(DDLArea.SelectedValue);
            puesto     = int.Parse(DDLPuesto.SelectedValue);

            bdCon     objconexion = new bdCon();
            string    Query       = string.Format("exec modificarEmplea2RH '{0}','{1}','{2}',{3},{4},'{5}','{6}'", Nombre, Apellidos, Matricula, Telefono.ToString(), puesto, area, Contraseña);
            DataTable dtresultado = objconexion.GetDataTable(Query);

            objconexion.objSqlconn.Close();


            string script = "window.close();";

            ScriptManager.RegisterStartupScript(Page, Page.GetType(), "closewindows", script, true);
        }
Пример #17
0
        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);
        }
 public virtual string ObtenerDetalle()
 {
     return(Apellido + "," + Nombre + "-" + "Telefono:" + "," + Telefono.ToString() + "-" +
            LocalidadP.Provincia + "," + LocalidadP.NombreLocalidad + "," + Direccion);
 }