コード例 #1
0
        public HttpResponseMessage Delete([FromUri] int id, [FromBody] int modifiedBy)
        {
            CostCenter Cost = new CostCenter();

            Cost.ID         = id;
            Cost.ModifiedBy = modifiedBy;
            return(Request.CreateResponse(HttpStatusCode.OK, Cost.Delete()));
        }
コード例 #2
0
        public void Delete()
        {
            CostCenterID[] delete = new CostCenterID[1];
            delete[0] = new CostCenterID()
            {
                CostCenterInteropID = InteropID,
                CompanyInteropID    = CompanyInteropID
            };
            var error = _costcenter.Delete(delete, this.SharedSecret);

            if (error.Length > 0)
            {
                throw new Exception(error[0].InteropID + " failed: " + error[0].ErrorMessage);
            }
        }