/// <summary> /// Converts this instance of <see cref="tblBill"/> to an instance of <see cref="tblBillDTO"/>. /// </summary> /// <param name="entity"><see cref="tblBill"/> to convert.</param> public static tblBillDTO ToDTO(this tblBill entity) { if (entity == null) { return(null); } var dto = new tblBillDTO(); dto.BillId = entity.BillId; dto.BillNo = entity.BillNo; dto.BillDate = entity.BillDate; dto.PartyId = entity.PartyId; dto.BranchCode = entity.BranchCode; dto.PaymentDueDate = entity.PaymentDueDate; dto.BillType = entity.BillType; dto.BasicOfChargesGC = entity.BasicOfChargesGC; dto.Enclosure = entity.Enclosure; dto.ServiceTaxThrough = entity.ServiceTaxThrough; dto.CheckedBy = entity.CheckedBy; dto.GrandTotal = entity.GrandTotal; dto.ServiceTaxRegdNo = entity.ServiceTaxRegdNo; dto.tblConsignorDTO = entity.tblConsignor.ToDTO(); entity.OnDTO(dto); return(dto); }
/// <summary> /// Converts this instance of <see cref="tblBillDTO"/> to an instance of <see cref="tblBill"/>. /// </summary> /// <param name="dto"><see cref="tblBillDTO"/> to convert.</param> public static tblBill ToEntity(this tblBillDTO dto) { if (dto == null) { return(null); } var entity = new tblBill(); entity.BillId = dto.BillId; entity.BillNo = dto.BillNo; entity.BillDate = dto.BillDate; entity.PartyId = dto.PartyId; entity.BranchCode = dto.BranchCode; entity.PaymentDueDate = dto.PaymentDueDate; entity.BillType = dto.BillType; entity.BasicOfChargesGC = dto.BasicOfChargesGC; entity.Enclosure = dto.Enclosure; entity.ServiceTaxThrough = dto.ServiceTaxThrough; entity.CheckedBy = dto.CheckedBy; entity.GrandTotal = dto.GrandTotal; entity.ServiceTaxRegdNo = dto.ServiceTaxRegdNo; dto.OnEntity(entity); return(entity); }
/// <summary> /// Invoked when <see cref="ToEntity"/> operation is about to return. /// </summary> /// <param name="entity"><see cref="tblBill"/> converted from <see cref="tblBillDTO"/>.</param> static partial void OnEntity(this tblBillDTO dto, tblBill entity);
/// <summary> /// Invoked when <see cref="ToDTO"/> operation is about to return. /// </summary> /// <param name="dto"><see cref="tblBillDTO"/> converted from <see cref="tblBill"/>.</param> static partial void OnDTO(this tblBill entity, tblBillDTO dto);