public bool DeleteGiftCertificateDetail(GiftCertificateDetail giftCertificateDetail) { if (giftCertificateDetail == null) return false; _unitOfWork.GiftCertificateDetailRepository.Delete(giftCertificateDetail); _unitOfWork.Save(); return true; }
public static GiftCertificateDetail BindGiftCertificateDetail(GiftCertificateDetail giftCertificateDetail, GiftCertificateDetailsViewModel giftCertificateDetailsViewModel) { giftCertificateDetail.CommodityID = giftCertificateDetailsViewModel.CommodityID; giftCertificateDetail.BillOfLoading = giftCertificateDetailsViewModel.BillOfLoading; giftCertificateDetail.YearPurchased = giftCertificateDetailsViewModel.YearPurchased; giftCertificateDetail.AccountNumber = giftCertificateDetailsViewModel.AccountNumber; giftCertificateDetail.WeightInMT = giftCertificateDetailsViewModel.WeightInMT; giftCertificateDetail.EstimatedPrice = giftCertificateDetailsViewModel.EstimatedPrice; giftCertificateDetail.EstimatedTax = giftCertificateDetailsViewModel.EstimatedTax; giftCertificateDetail.DCurrencyID = giftCertificateDetailsViewModel.DCurrencyID; giftCertificateDetail.DFundSourceID = giftCertificateDetailsViewModel.DFundSourceID; giftCertificateDetail.DBudgetTypeID = giftCertificateDetailsViewModel.DBudgetTypeID; giftCertificateDetail.GiftCertificateDetailID = giftCertificateDetailsViewModel.GiftCertificateDetailID; giftCertificateDetail.GiftCertificateDetailID = giftCertificateDetailsViewModel.GiftCertificateDetailID; giftCertificateDetail.GiftCertificateID = giftCertificateDetailsViewModel.GiftCertificateID; giftCertificateDetail.TransactionGroupID = giftCertificateDetailsViewModel.TransactionGroupID; giftCertificateDetail.ExpiryDate = giftCertificateDetailsViewModel.ExpiryDate; return giftCertificateDetail; }
public static GiftCertificateDetailsViewModel BindGiftCertificateDetailsViewModel(GiftCertificateDetail giftCertificateDetail) { var model = new GiftCertificateDetailsViewModel(); model.GiftCertificateID = giftCertificateDetail.GiftCertificateID; model.GiftCertificateDetailID = giftCertificateDetail.GiftCertificateDetailID; model.CommodityID = giftCertificateDetail.CommodityID; model.BillOfLoading = giftCertificateDetail.BillOfLoading; model.YearPurchased = giftCertificateDetail.YearPurchased; model.AccountNumber = giftCertificateDetail.AccountNumber; model.WeightInMT = giftCertificateDetail.WeightInMT; model.EstimatedPrice = giftCertificateDetail.EstimatedPrice; model.EstimatedTax = giftCertificateDetail.EstimatedTax; model.DBudgetTypeID = giftCertificateDetail.DBudgetTypeID; model.DFundSourceID = giftCertificateDetail.DFundSourceID; model.DCurrencyID = giftCertificateDetail.DCurrencyID; model.ExpiryDate = giftCertificateDetail.ExpiryDate; model.FundSource = giftCertificateDetail.Detail.Name; model.CommodityName = giftCertificateDetail.Commodity.Name; return model; }
public bool EditGiftCertificateDetail(GiftCertificateDetail giftCertificateDetail) { _unitOfWork.GiftCertificateDetailRepository.Edit(giftCertificateDetail); _unitOfWork.Save(); return true; }