Exemple #1
0
        //
        // GET: /GiftCertificate/Create

        public ActionResult Create()
        {
            ViewBag.Commodities       = _commodityService.GetAllCommodity().OrderBy(o => o.Name);
            ViewBag.CommodityTypes    = new SelectList(_commodityTypeService.GetAllCommodityType().OrderBy(o => o.Name), "CommodityTypeID", "Name");
            ViewBag.DCurrencies       = _detailService.GetAllDetail().Where(d => d.MasterID == Master.Constants.CURRENCY).OrderBy(o => o.SortOrder);
            ViewBag.DFundSources      = _detailService.GetAllDetail().Where(d => d.MasterID == Master.Constants.FUND_SOURCE).OrderBy(o => o.SortOrder);
            ViewBag.DBudgetTypes      = _detailService.GetAllDetail().Where(d => d.MasterID == Master.Constants.BUDGET_TYPE).OrderBy(o => o.SortOrder);
            ViewBag.Donors            = new SelectList(_donorService.GetAllDonor().OrderBy(o => o.Name), "DonorID", "Name");
            ViewBag.Programs          = new SelectList(_programService.GetAllProgram(), "ProgramID", "Name");
            ViewBag.DModeOfTransports = new SelectList(_detailService.GetAllDetail().Where(d => d.MasterID == Master.Constants.TRANSPORT_MODE).OrderBy(o => o.SortOrder), "DetailID", "Name");

            List <GiftCertificateDetailsViewModel> GiftCertificateDetails = new List <GiftCertificateDetailsViewModel>();

            ViewBag.GiftCertificateDetails = GiftCertificateDetails;

            return(View(new GiftCertificateViewModel()));
        }