public void CreateRentalHeader(RentalHeader header) { string query = String.Format("INSERT INTO tblrentalheader (rentalid,rentalno,transactiondate,duedate,custid,status) values ('{0}','{1}','{2}','{3}','{4}','{5}')", header.RentalId, header.RentalNo, header.TransactionDate, header.DueDate, header.CustId,header.Status); qryObjectMapper.Map<RentalHeader>(query); }
public void UpdateRentalHeader(RentalHeader header) { string query = String.Format("UPDATE tblrentalheader set status = '{0}' where rentalid = '{1}'", header.Status, header.RentalId); qryObjectMapper.Map<RentalHeader>(query); }
private void CreateRentalHeader(Rental rent) { RentalHeader header = new RentalHeader { CustId = rent.CustId, DueDate = rent.DueDate, RentalId = rent.RentalId, RentalNo = rent.RentalNo, TransactionDate = rent.TransactionDate, Status = RentalStatus.APPROVED }; Penyewaan.CreateRentalHeader(header); }