Exemplo n.º 1
0
        public IHttpActionResult SaveBusinessParty(rfbp1 BusinessParty)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            bool isDone = BusinessPartyHelper.SaveBusinessParty(BusinessParty);

            if (!isDone)
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Exemplo n.º 2
0
        public IHttpActionResult DeleteBusinessParty(string BusinessPartyCode, int Type)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            bool isDone = BusinessPartyHelper.DeleteBusinessParty(BusinessPartyCode, Type);

            if (!isDone)
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Exemplo n.º 3
0
        public IHttpActionResult GetBusinessParty(string BusinessPartyCode)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest());
            }
            var myParty = BusinessPartyHelper.GetBusinessParty(BusinessPartyCode);

            if (myParty == null)
            {
                return(InternalServerError());
            }
            return(Ok(myParty));
        }