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

            if (!isDone)
            {
                return(InternalServerError());
            }
            return(Ok());
        }
Esempio 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());
        }
Esempio 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));
        }