Esempio n. 1
0
        public bool delete(int idSujeto)
        {
            bool      result = false;
            SujetoDAO dao    = new SujetoDAO();

            result = dao.delete(idSujeto);
            return(result);
        }
Esempio n. 2
0
        public string getAll()
        {
            SujetoDAO     dao     = new SujetoDAO();
            List <Sujeto> lista   = dao.getAll();
            String        strJSON = JsonConvert.SerializeObject(lista, new JsonSerializerSettings {
                NullValueHandling = NullValueHandling.Ignore
            });

            return(strJSON);
        }
Esempio n. 3
0
        public bool insert(String Objeto, String Posesivo, String Sucesivo, String sujeto, String sujetoTraducido)
        {
            bool      result = false;
            SujetoDAO dao    = new SujetoDAO();
            Sujeto    obj    = new Sujeto()
            {
                Objeto = Objeto, Posesivo = Posesivo, Sucesivo = Sucesivo, sujeto = sujeto, SujetoTraducido = sujetoTraducido
            };

            result = dao.insert(obj);
            return(result);
        }
Esempio n. 4
0
        public String getSujetoByID(int ID)
        {
            SujetoDAO dao = new SujetoDAO();
            Sujeto    res = dao.getSujetoByID(ID);
            String    strJSON;

            strJSON = JsonConvert.SerializeObject(res, new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            });
            return(strJSON);
        }
Esempio n. 5
0
        public bool update(int idSujeto, String Objeto, String Posesivo, String Sucesivo, String sujeto, String sujetoTraducido)
        {
            bool      result = false;
            SujetoDAO dao    = new SujetoDAO();
            Sujeto    obj    = new Sujeto()
            {
                IdSujeto = idSujeto, Objeto = Objeto, Posesivo = Posesivo, Sucesivo = Sucesivo,
                sujeto   = sujeto, SujetoTraducido = sujetoTraducido
            };

            result = dao.update(obj);
            return(result);
        }