Example #1
0
 public bool Delete()
 {
     try
     {
         Datos.arquero ar = Conector.Fetach.arqueroes.First(a => a.rut == this.Rut);
         Conector.Fetach.DeleteObject(ar);
         Conector.Fetach.SaveChanges();
         return(true);
     }
     catch
     {
         return(false);
     }
 }
Example #2
0
        public bool Read()
        {
            try
            {
                Datos.arquero ar = Conector.Fetach.arqueroes.First(a => a.rut == this.Rut);
                this.Rut              = ar.rut;
                this.Nombre_completo  = ar.nombre_completo;
                this.Direccion        = ar.direccion;
                this.Asociacion       = ar.asociacion;
                this.Fecha_nacimiento = ar.fecha_nacimiento;
                this.Al_dia           = ar.al_dia;

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Example #3
0
        public bool Update()
        {
            try
            {
                Datos.arquero ar = Conector.Fetach.arqueroes.First(a => a.rut == this.Rut);
                ar.rut              = this.Rut;
                ar.nombre_completo  = this.Nombre_completo;
                ar.direccion        = this.Direccion;
                ar.asociacion       = this.Asociacion;
                ar.fecha_nacimiento = this.Fecha_nacimiento;
                ar.al_dia           = this.Al_dia;

                Conector.Fetach.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }
Example #4
0
        public bool Create()
        {
            try
            {
                Datos.arquero ar = new Datos.arquero();
                ar.rut              = this.Rut;
                ar.nombre_completo  = this.Nombre_completo;
                ar.direccion        = this.Direccion;
                ar.asociacion       = this.Asociacion;
                ar.fecha_nacimiento = this.Fecha_nacimiento;
                ar.al_dia           = this.Al_dia;

                Conector.Fetach.AddToarqueroes(ar);
                Conector.Fetach.SaveChanges();

                return(true);
            }
            catch
            {
                return(false);
            }
        }