public void AmountPaid(ODCDetails OdcDetails) { DateTime DateofPayement = OdcDetails.DateOfPayement; string query = "insert into PaymentDetails values (@AmountPaid,@DateOfPayement)"; connection.Execute(query, new { OdcDetails.AmountPaid, OdcDetails.DateOfPayement }); }
public void AddStudent(ODCDetails oDCDetails) { try { if (connection.State == ConnectionState.Closed) { connection.Open(); } oDCDetails.IsPaymentDone = false; string query = "Insert into ODCDetails values (@NameOfCandidate,@SurnameOfCandidate,@CodeOfCandidate,@Place,@Timing,@DateOfODC,@Department,@IsPaymentDone)"; connection.Execute(query, new { oDCDetails.NameOfCandidate, oDCDetails.SurnameOfCandidate, oDCDetails.CodeOfCandidate, oDCDetails.Place, oDCDetails.Timing, oDCDetails.DateOfODC, oDCDetails.Department, oDCDetails.IsPaymentDone }); } catch (System.Exception ex) { throw; } }
public void AddStudent(AddODCDetailsViewModel addODCDetailsViewModel) { var odcDetails = new ODCDetails() { NameOfCandidate = addODCDetailsViewModel.NameOfCandidate, SurnameOfCandidate = addODCDetailsViewModel.SurnameOfCandidate, CodeOfCandidate = addODCDetailsViewModel.CodeOfCandidate, Place = addODCDetailsViewModel.Place, Timing = addODCDetailsViewModel.Timing, AmountPaid = addODCDetailsViewModel.AmountPaid, DateOfPayement = addODCDetailsViewModel.DateOfPayement, DateOfODC = addODCDetailsViewModel.DateOfODC, Department = addODCDetailsViewModel.Department, Conveyence = addODCDetailsViewModel.Conveyence }; oDCDataAccess.AddStudent(odcDetails); }
public void AmountPaid(ODCDetails oDCDetails) { payment.AmountPaid(oDCDetails); }