Exemple #1
0
        public IHttpActionResult Get(int id)
        {
            DTO_CUS_DOC_Folder tbl_CUS_DOC_Folder = BS_CUS_DOC_Folder.get_CUS_DOC_Folder(db, PartnerID, id);

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

            return(Ok(tbl_CUS_DOC_Folder));
        }
Exemple #2
0
        public IHttpActionResult Post(DTO_CUS_DOC_Folder tbl_CUS_DOC_Folder)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            DTO_CUS_DOC_Folder result = BS_CUS_DOC_Folder.post_CUS_DOC_Folder(db, PartnerID, tbl_CUS_DOC_Folder, Username);


            if (result != null)
            {
                return(CreatedAtRoute("get_CUS_DOC_Folder", new { id = result.ID }, result));
            }
            return(Conflict());
        }
Exemple #3
0
        public IHttpActionResult Delete(int id)
        {
            bool check = BS_CUS_DOC_Folder.check_CUS_DOC_Folder_Exists(db, id);

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

            string result = BS_CUS_DOC_Folder.delete_CUS_DOC_FolderCustom(db, id, Username);

            if (string.IsNullOrEmpty(result))
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            else
            {
                return(BadRequest(result));
            }
        }
Exemple #4
0
        public IHttpActionResult Put(int id, DTO_CUS_DOC_Folder tbl_CUS_DOC_Folder)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

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


            bool resul = BS_CUS_DOC_Folder.put_CUS_DOC_Folder(db, PartnerID, id, tbl_CUS_DOC_Folder, Username);

            if (resul)
            {
                return(StatusCode(HttpStatusCode.NoContent));
            }
            else
            {
                return(NotFound());
            }
        }
Exemple #5
0
 public List <DTO_CUS_DOC_RPT_FileExtention> GetRPTFileByType()
 {
     return(BS_CUS_DOC_Folder.RPT_FileByType(db, PartnerID, QueryStrings));
 }
Exemple #6
0
 public List <DTO_CUS_DOC_RPT_Folder> GetRTPFileInFolder()
 {
     return(BS_CUS_DOC_Folder.RPT_FileInFolder(db, PartnerID, QueryStrings));
 }
Exemple #7
0
 public IQueryable <DTO_CUS_DOC_Folder> Get()
 {
     return(BS_CUS_DOC_Folder.get_CUS_DOC_Folder(db, PartnerID, QueryStrings));
 }