예제 #1
0
        public bool Delete()
        {
            try
            {
                Modelo.COMPETENCIA com = CommonBC.ModeloWfbs.COMPETENCIA.First(c => c.ID_COMPETENCIA == this.Id_com);
                com.OBSOLETA = 1;
                CommonBC.ModeloWfbs.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #2
0
        public bool Delete()
        {
            try
            {
                /*                 NO SE ELIMINA, SE DESACTIVA                 */
                Modelo.COMPETENCIA com = CommonBC.ModeloWfbs.COMPETENCIA.First(c => c.ID_COMPETENCIA == this.Id_competencia);
                CommonBC.ModeloWfbs.COMPETENCIA.Remove(com);
                CommonBC.ModeloWfbs.SaveChanges();

                return(true);
            }
            catch (Exception)
            {
                return(false);
            }
        }
예제 #3
0
        public bool Read()
        {
            try
            {
                Modelo.COMPETENCIA com = CommonBC.ModeloWfbs.COMPETENCIA.First(b => b.ID_COMPETENCIA == this.Id_competencia);

                this.Id_competencia = Convert.ToInt32(com.ID_COMPETENCIA);
                this.Nombre         = com.NOMBRE;
                this.Descripcion    = com.DESCRIPCION;
                this.Sigla          = com.SIGLA;
                this.Obsoleta       = Convert.ToInt32(com.OBSOLETA);
                this.Nivel_Optimo   = Convert.ToInt32(com.NIVEL_OPTIMO_ESPERADO);

                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }
예제 #4
0
        public bool Update()
        {
            try
            {
                Modelo.COMPETENCIA com = CommonBC.ModeloWfbs.COMPETENCIA.First(c => c.ID_COMPETENCIA == this.Id_competencia);

                com.ID_COMPETENCIA        = this.Id_competencia;
                com.NOMBRE                = this.Nombre;
                com.DESCRIPCION           = this.Descripcion;
                com.SIGLA                 = this.Sigla;
                com.OBSOLETA              = this.Obsoleta;
                com.NIVEL_OPTIMO_ESPERADO = this.Nivel_Optimo;

                CommonBC.ModeloWfbs.SaveChanges();
                return(true);
            }
            catch (Exception ex)
            {
                return(false);
            }
        }