public IHttpActionResult PostView_Customer_Payment_SalesInvoice(View_Customer_Payment_SalesInvoice view_Customer_Payment_SalesInvoice)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            db.View_Customer_Payment_SalesInvoice.Add(view_Customer_Payment_SalesInvoice);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (View_Customer_Payment_SalesInvoiceExists(view_Customer_Payment_SalesInvoice.Id))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

            return CreatedAtRoute("DefaultApi", new { id = view_Customer_Payment_SalesInvoice.Id }, view_Customer_Payment_SalesInvoice);
        }
        public IHttpActionResult PutView_Customer_Payment_SalesInvoice(int id, View_Customer_Payment_SalesInvoice view_Customer_Payment_SalesInvoice)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            if (id != view_Customer_Payment_SalesInvoice.Id)
            {
                return BadRequest();
            }

            db.Entry(view_Customer_Payment_SalesInvoice).State = EntityState.Modified;

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateConcurrencyException)
            {
                if (!View_Customer_Payment_SalesInvoiceExists(id))
                {
                    return NotFound();
                }
                else
                {
                    throw;
                }
            }

            return StatusCode(HttpStatusCode.NoContent);
        }