public static ReceiptAllocationViewModelDto GenerateAllocationViewModelDto(BLL.ReceiptAllocation receiptAllocation)
        {
            ReceiptAllocationViewModelDto receiptAllocationViewModelDto = new ReceiptAllocationViewModelDto();

            receiptAllocationViewModelDto.ProjectNumber = receiptAllocation.ProjectNumber;
            receiptAllocationViewModelDto.CommodityID   = receiptAllocation.CommodityID;
            receiptAllocationViewModelDto.SINumber      = receiptAllocation.SINumber;
            receiptAllocationViewModelDto.QuantityInMT  = receiptAllocation.QuantityInMT;

            receiptAllocationViewModelDto.HubID = receiptAllocation.HubID;
            receiptAllocationViewModelDto.ETA   = receiptAllocation.ETA;
            if (receiptAllocation.DonorID != null)
            {
                receiptAllocationViewModelDto.DonorID = receiptAllocation.DonorID.Value;
            }
            if (receiptAllocation.GiftCertificateDetailID != null)
            {
                receiptAllocationViewModelDto.GiftCertificateDetailID = receiptAllocation.GiftCertificateDetailID.Value;
            }
            receiptAllocationViewModelDto.ReceiptAllocationID = receiptAllocation.ReceiptAllocationID;
            receiptAllocationViewModelDto.IsCommited          = receiptAllocation.IsCommited;
            if (receiptAllocation.SourceHubID != null)
            {
                receiptAllocationViewModelDto.SourceHubID = receiptAllocation.SourceHubID.Value;
            }
            receiptAllocationViewModelDto.PurchaseOrder         = receiptAllocation.PurchaseOrder;
            receiptAllocationViewModelDto.SupplierName          = receiptAllocation.SupplierName;
            receiptAllocationViewModelDto.OtherDocumentationRef = receiptAllocation.OtherDocumentationRef;
            receiptAllocationViewModelDto.Remark = receiptAllocation.Remark;

            receiptAllocationViewModelDto.ProgramID         = receiptAllocation.ProgramID;
            receiptAllocationViewModelDto.CommoditySourceID = receiptAllocation.CommoditySourceID;

            receiptAllocationViewModelDto.CommodityName        = receiptAllocation.CommodityName;
            receiptAllocationViewModelDto.ReceivedQuantityInMT = receiptAllocation.ReceivedQuantityInMT;
            receiptAllocationViewModelDto.RemainingBalanceInMt = receiptAllocation.RemainingBalanceInMt;


            return(receiptAllocationViewModelDto);
        }
        public static ReceiptAllocationViewModelDto GenerateAllocationViewModelDto(BLL.ReceiptAllocation receiptAllocation)
        {
            ReceiptAllocationViewModelDto receiptAllocationViewModelDto = new ReceiptAllocationViewModelDto();
            receiptAllocationViewModelDto.ProjectNumber = receiptAllocation.ProjectNumber;
            receiptAllocationViewModelDto.CommodityID = receiptAllocation.CommodityID;
            receiptAllocationViewModelDto.SINumber = receiptAllocation.SINumber;
            receiptAllocationViewModelDto.QuantityInMT = receiptAllocation.QuantityInMT;

            receiptAllocationViewModelDto.HubID = receiptAllocation.HubID;
            receiptAllocationViewModelDto.ETA = receiptAllocation.ETA;
            if (receiptAllocation.DonorID != null) receiptAllocationViewModelDto.DonorID = receiptAllocation.DonorID.Value;
            if (receiptAllocation.GiftCertificateDetailID != null)
                receiptAllocationViewModelDto.GiftCertificateDetailID = receiptAllocation.GiftCertificateDetailID.Value;
            receiptAllocationViewModelDto.ReceiptAllocationID = receiptAllocation.ReceiptAllocationID;
            receiptAllocationViewModelDto.IsCommited = receiptAllocation.IsCommited;
            if (receiptAllocation.SourceHubID != null)
                receiptAllocationViewModelDto.SourceHubID = receiptAllocation.SourceHubID.Value;
            receiptAllocationViewModelDto.PurchaseOrder = receiptAllocation.PurchaseOrder;
            receiptAllocationViewModelDto.SupplierName = receiptAllocation.SupplierName;
            receiptAllocationViewModelDto.OtherDocumentationRef = receiptAllocation.OtherDocumentationRef;
            receiptAllocationViewModelDto.Remark = receiptAllocation.Remark;

            receiptAllocationViewModelDto.ProgramID = receiptAllocation.ProgramID;
            receiptAllocationViewModelDto.CommoditySourceID = receiptAllocation.CommoditySourceID;

            receiptAllocationViewModelDto.CommodityName = receiptAllocation.CommodityName;
            receiptAllocationViewModelDto.ReceivedQuantityInMT = receiptAllocation.ReceivedQuantityInMT;
            receiptAllocationViewModelDto.RemainingBalanceInMt = receiptAllocation.RemainingBalanceInMt;

            return receiptAllocationViewModelDto;
        }