Example #1
0
        public IEnumerable <DropDownListViewModel> Listbox(int?lobID     = null,
                                                           int?projectID = null,
                                                           int?companyID = null)
        {
            IEnumerable <DropDownListViewModel> results = null;

            _context.LoadStoredProc("dbo.Individuals_Listbox")
            .WithSqlParam("lobID", lobID)
            .WithSqlParam("projectID", projectID)
            .WithSqlParam("companyID", companyID)
            .ExecuteStoredProc((handler) =>
            {
                results = handler.ReadToList <DropDownListViewModel>();
                // do something with your results.
            });

            //var mock = new List<DropDownListViewModel>();
            //mock.Add(new DropDownListViewModel { Value = 27, Text = "000827 - Visionstream Ops NSW" });
            //mock.Add(new DropDownListViewModel { Value = 35, Text = "000833 - TELSTRADIUS" });
            //mock.Add(new DropDownListViewModel { Value = 264, Text = "034122 - ENERGEX - OVERHEAD WIRES" });
            //mock.Add(new DropDownListViewModel { Value = 244, Text = "110310 - FSDNSW" });
            //mock.Add(new DropDownListViewModel { Value = 318, Text = "200200 - TRANSGRID" });

            //return mock;

            return(results);
        }
Example #2
0
        // Expired Items - 1
        public IEnumerable <InsuranceTypeNumberExpiredViewModel> CompanyExpiredInsurances_EFExtensions(int?lobID     = null,
                                                                                                       int?projectID = null,
                                                                                                       int?companyID = null)
        {
            IEnumerable <InsuranceTypeNumberExpiredViewModel> results = null;

            if (lobID == 0)
            {
                lobID = null;
            }
            if (projectID == 0)
            {
                projectID = null;
            }
            if (companyID == 0)
            {
                companyID = null;
            }

            _context.LoadStoredProc("dbo.Dashboard_ExpiredItems_CompanyExpiredInsurance")

            .WithSqlParam("lobID", lobID)
            .WithSqlParam("projectID", projectID)
            .WithSqlParam("companyID", companyID)

            .ExecuteStoredProc((handler) =>
            {
                results = handler.ReadToList <InsuranceTypeNumberExpiredViewModel>();
                // do something with your results.
            });

            return(results);
        }
Example #3
0
        public IEnumerable <DropDownListViewModel> Listbox()
        {
            IEnumerable <DropDownListViewModel> results = null;

            _context.LoadStoredProc("dbo.Lobs_Listbox")
            .ExecuteStoredProc((handler) =>
            {
                results = handler.ReadToList <DropDownListViewModel>();
                // do something with your results.
            });

            return(results);
        }
Example #4
0
        public IEnumerable <DropDownListViewModel> Listbox(int?lobID = null)
        {
            IEnumerable <DropDownListViewModel> results = null;

            _context.LoadStoredProc("Projects_Listbox")
            .WithSqlParam("lobID", lobID)
            .ExecuteStoredProc((handler) =>
            {
                results = handler.ReadToList <DropDownListViewModel>();
                // do something with your results.
            });

            return(results);
        }
Example #5
0
        public IEnumerable <CompanyExpiredInsurancesViewModel> CompanyExpiredInsurances_EFExtensions()
        {
            IEnumerable <CompanyExpiredInsurancesViewModel> results = null;

            _context.LoadStoredProc("dbo.Dashboard_ExpiredItems_Company")
            // .WithSqlParam("fooId", 1)
            .ExecuteStoredProc((handler) =>
            {
                results = handler.ReadToList <CompanyExpiredInsurancesViewModel>();
                // do something with your results.
            });

            return(results);
        }