예제 #1
0
        internal void DownloadPDFSingleView(Controller controller, string viewName, string fileName, bool displayPDFLink = false)
        {
            model = new TargetListViewModel();
            model.displayPDFLink = displayPDFLink;

            model.GetAssayList(viewName);

            pdfModel.DownloadPDFSingleView(controller, viewName, model, fileName, "TargetList");
        }
        private void FillWorkSheetData(ExcelWorksheet ws, WorkSheetProperty property, int rowIndex)
        {
            int sectionHeaderIndex = 0;


            TargetListViewModel model = new TargetListViewModel();

            model.GetAssayList(property.viewName);

            if (property.sectionHeader != null && property.sectionHeader.Count > 0)
            {
                CreateSectionHeader(ws, rowIndex, property, sectionHeaderIndex);
                sectionHeaderIndex++;
            }

            if (property.name == "Known GPCR")
            {
                rowIndex = PopulateDataFromAssayListTotalGPCR(rowIndex, model.TotalGPCRList, property.viewName, ws);
            }
            else if (property.name == "Cell-Based Kinases")
            {
                rowIndex = PopulateDataFromAssayListCellBasedKinases(rowIndex, model.RECEPTORList, ws);

                if (property.sectionHeader != null && property.sectionHeader.Count > 1)
                {
                    CreateSectionHeader(ws, rowIndex, property, sectionHeaderIndex);
                    sectionHeaderIndex++;
                }

                rowIndex = PopulateDataFromAssayListCellBasedKinases(rowIndex, model.CYTOSOLICList, ws);
            }
            else if (property.name == "Synergy Table")
            {
                rowIndex = PopulateDataFromSynergyList(rowIndex, model.SynergyList, property.viewName, ws);
            }
            else
            {
                rowIndex = PopulateDataFromAssayList(rowIndex, model.AssayList1, property.viewName, ws);


                if (property.sectionHeader != null && property.sectionHeader.Count > 1)
                {
                    CreateSectionHeader(ws, rowIndex, property, sectionHeaderIndex);
                    sectionHeaderIndex++;
                }

                rowIndex = PopulateDataFromAssayList(rowIndex, model.AssayList2, property.viewName, ws);

                if (property.sectionHeader != null && property.sectionHeader.Count > 2)
                {
                    CreateSectionHeader(ws, rowIndex, property, sectionHeaderIndex);
                    sectionHeaderIndex++;
                }

                rowIndex = PopulateDataFromAssayList(rowIndex, model.AssayList3, property.viewName, ws);

                if (property.sectionHeader != null && property.sectionHeader.Count > 3)
                {
                    CreateSectionHeader(ws, rowIndex, property, sectionHeaderIndex);
                    sectionHeaderIndex++;
                }

                rowIndex = PopulateDataFromAssayList(rowIndex, model.AssayList4, property.viewName, ws);
            }

            if (property.footerNotes != null)
            {
                CreateFooter(rowIndex, ws, property);
            }
        }