コード例 #1
0
        public void GetExcel(DrugBrandViewModel model)
        {
            List <DrugBrand> drugBrands = DrugBrandManager.Getdrugs();

            model.DrugBrands = drugBrands;

            const string fileName    = "DrugBrands";
            var          boundFields = new List <BoundField>
            {
                new BoundField()
                {
                    HeaderText = @"Brand Name", DataField = "Name"
                },
                new BoundField()
                {
                    HeaderText = @"Description", DataField = "Preparation"
                },
                new BoundField()
                {
                    HeaderText = @"Generic Name", DataField = "DrugGeneric.Name"
                }
            };

            ReportConverter.CustomGridView(boundFields, model.DrugBrands, fileName);
        }
コード例 #2
0
        public ActionResult Print(DrugBrandViewModel model)
        {
            var totalrecords = 0;
            //List<DrugBrand> drugBrands = DrugBrandManager.GetdrugBySearchKey(model.SeachByBrandName);

            List <DrugBrand> drugBrands = DrugBrandManager.Getdrugs();

            //List<DrugBrand> drugBrands = DrugBrandManager.GetAllDrugBrand(out totalrecords, model);
            model.DrugBrands = drugBrands;
            return(View("_DrugBrandtPdfReport", model));
        }