Exemplo n.º 1
0
        public IHttpActionResult Get(int id)
        {
            DTO_CUS_DOC_Folder_Permission tbl_CUS_DOC_Folder_Permission = BS_CUS_DOC_Folder_Permission.get_CUS_DOC_Folder_Permission(db, PartnerID, id);

            if (tbl_CUS_DOC_Folder_Permission == null)
            {
                return(NotFound());
            }

            return(Ok(tbl_CUS_DOC_Folder_Permission));
        }
Exemplo n.º 2
0
        public IHttpActionResult Post(DTO_CUS_DOC_Folder_Permission tbl_CUS_DOC_Folder_Permission)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            DTO_CUS_DOC_Folder_Permission result = BS_CUS_DOC_Folder_Permission.post_CUS_DOC_Folder_Permission(db, PartnerID, tbl_CUS_DOC_Folder_Permission, Username);


            if (result != null)
            {
                return(CreatedAtRoute("get_CUS_DOC_Folder_Permission", new { id = result.ID }, result));
            }
            return(Conflict());
        }
Exemplo n.º 3
0
        public IHttpActionResult Delete(int id)
        {
            bool check = BS_CUS_DOC_Folder_Permission.check_CUS_DOC_Folder_Permission_Exists(db, id);

            if (!check)
            {
                return(NotFound());
            }

            bool result = BS_CUS_DOC_Folder_Permission.delete_CUS_DOC_Folder_Permission(db, id, Username);

            if (result)
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            return(Conflict());
        }
Exemplo n.º 4
0
        public IHttpActionResult Put(int id, DTO_CUS_DOC_Folder_Permission tbl_CUS_DOC_Folder_Permission)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            if (id != tbl_CUS_DOC_Folder_Permission.ID || PartnerID != tbl_CUS_DOC_Folder_Permission.IDPartner)
            {
                return(BadRequest());
            }


            bool resul = BS_CUS_DOC_Folder_Permission.put_CUS_DOC_Folder_Permission(db, PartnerID, id, tbl_CUS_DOC_Folder_Permission, Username);

            if (resul)
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            else
            {
                return(NotFound());
            }
        }
Exemplo n.º 5
0
 public IQueryable <DTO_CUS_DOC_Folder_Permission> Get()
 {
     return(BS_CUS_DOC_Folder_Permission.get_CUS_DOC_Folder_Permission(db, PartnerID, QueryStrings));
 }