Exemplo n.º 1
0
        public bool Delete()
        {
            try
            {
                Modelo.AREA us = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area);
                us.OBSOLETA = 1;

                CommonBC.ModeloWfbs.SaveChanges();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemplo n.º 2
0
        public bool Update()
        {
            try
            {
                Modelo.AREA us = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area);
                us.NOMBRE      = this.area;
                us.ID_AREA     = this.id_area;
                us.ABREVIACION = this.abreviacion;
                us.OBSOLETA    = this.obsoleta;

                CommonBC.ModeloWfbs.SaveChanges();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
Exemplo n.º 3
0
        public bool Read()
        {
            try
            {
                Modelo.AREA area = CommonBC.ModeloWfbs.AREA.First(b => b.ID_AREA == this.id_area);

                this.id_area     = Convert.ToInt32(area.ID_AREA);
                this.area        = area.NOMBRE;
                this.abreviacion = area.ABREVIACION;
                this.obsoleta    = Convert.ToInt32(area.OBSOLETA);

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