Ejemplo n.º 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);
        }
Ejemplo n.º 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));
        }