Exemplo n.º 1
0
 public IActionResult AddPatientInvoiceReturn([FromBody] PatientInvoiceReturn model)
 {
     if (model.ReturnDate == null)
     {
         model.ReturnDate = DateTime.Now;
     }
     model.InvoiceReturnNumber = GenPIRN();
     Return_repo.Add(model);
     return(new OkObjectResult(new { PatientInvoiceReturnID = model.PatientInvoiceReturnId }));
 }
Exemplo n.º 2
0
        public IActionResult DeletePatientInvoiceReturn(long id)
        {
            PatientInvoiceReturn patientInvoiceReturn = Return_repo.Find(id);

            if (patientInvoiceReturn == null)
            {
                return(NotFound());
            }
            Returnitem_repo.DeleteRange(Returnitem_repo.GetAll().Where(a => a.PatientInvoiceReturnId == patientInvoiceReturn.PatientInvoiceReturnId));

            Return_repo.Delete(patientInvoiceReturn);
            return(Ok());
        }
Exemplo n.º 3
0
 public IActionResult UpdatePatientInvoiceReturn([FromBody] PatientInvoiceReturn model)
 {
     Return_repo.Update(model);
     return(new OkObjectResult(new { PatientInvoiceReturnID = model.PatientInvoiceReturnId }));
 }