public StudentPaymentEntity(DataAccessLogic.tblStudentPayment StudentPayment)
        {
            this.ID            = StudentPayment.ID;
            this.RecieptNumber = StudentPayment.RecieptNumber;
            this.CashierName   = StudentPayment.CashierName;
            this.PaidBy        = StudentPayment.PaidBy;
            this.IsFullyPaid   = StudentPayment.IsFullyPaid;

            this.PaymentPeriod = new PaymentPeriodEntity(StudentPayment.tblPaymentPeriod);
            this.PaymentReason = new PaymentReasonEntity(StudentPayment.tblPaymentReason);
            this.Student       = new StudentEntity(StudentPayment.tblStudent);

            this.CreatedBy   = StudentPayment.CreatedBy;
            this.CreatedDate = StudentPayment.CreatedDate;
            this.UpdatedBy   = StudentPayment.UpdatedBy;
            this.UpdatedDate = StudentPayment.UpdatedDate;
        }
        public T MapToModel <T>() where T : class
        {
            DataAccessLogic.tblStudentPayment StudentPayment = new DataAccessLogic.tblStudentPayment();
            StudentPayment.ID            = this.ID;
            StudentPayment.RecieptNumber = this.RecieptNumber;
            StudentPayment.CashierName   = this.CashierName;
            StudentPayment.PaidBy        = this.PaidBy;
            StudentPayment.IsFullyPaid   = this.IsFullyPaid;

            StudentPayment.PaymentPeriodID = this.PaymentPeriod.ID;
            StudentPayment.PaymentReasonID = this.PaymentReason.ID;
            StudentPayment.StudentID       = this.Student.ID;

            StudentPayment.CreatedBy   = this.CreatedBy;
            StudentPayment.CreatedDate = this.CreatedDate;
            StudentPayment.CreatedBy   = this.CreatedBy;
            StudentPayment.CreatedDate = this.CreatedDate;

            return(StudentPayment as T);
        }