//dropdowns for other tabs
        private void LoadAdditionalDropdownData()
        {
            var siteCoID = siteusercompanyid;

            ViewBag.CoStages  = new SelectList(db.GetCoStagesBySiteCoID(siteCoID).ToList(), nameof(GetCoStagesBySiteCoID_Result.StageMasterID), nameof(GetCoStagesBySiteCoID_Result.Stage));
            ViewBag.CostCodes = new SelectList(db.GetCoCostCodesBySiteCoID(siteCoID).ToList(), nameof(GetCoCostCodesBySiteCoID_Result.CostCodeID), nameof(GetCoCostCodesBySiteCoID_Result.CostCode));
            ViewBag.PayTypes  = new SelectList(db.GetPayTypesBySiteCoID(siteCoID).ToList(), nameof(GetPayTypesBySiteCoID_Result.ViewID), nameof(GetPayTypesBySiteCoID_Result.Name));
            ViewBag.Taxes     = new SelectList(db.GetCoTaxesBySiteCoID(siteCoID).ToList(), nameof(GetCoTaxesBySiteCoID_Result.ViewID), nameof(GetCoTaxesBySiteCoID_Result.Tax));
            ViewBag.Areas     = new SelectList(db.GetCoAreasBySiteCoID(siteCoID).ToList(), nameof(GetCoAreasBySiteCoID_Result.ViewID), nameof(GetCoAreasBySiteCoID_Result.Area));
            ViewBag.Divisions = new SelectList(db.GetCoDivisionsBySiteCoID(siteCoID).ToList(), nameof(GetCoDivisionsBySiteCoID_Result.ViewID), nameof(GetCoDivisionsBySiteCoID_Result.Divisions));
        }
Exemplo n.º 2
0
        // GET: Options/QuoteOptions
        public ActionResult Index()
        {
            int siteCoID = base.siteusercompanyid;

            ViewBag.CoQuoteNumFormats = db.GetQuoteNumFormatsBySiteCoID(siteCoID).ToList();
            ViewBag.CoQuoteStatus     = db.GetQuoteStatusBySiteCoID(siteCoID);
            ViewBag.CoAreas           = db.GetCoAreasBySiteCoID(siteCoID);
            ViewBag.CoDivisions       = db.GetCoDivisionsBySiteCoID(siteCoID);
            ViewBag.CoQuoteTemplates  = db.GetQuoteTemplatesBySiteCoID(siteCoID);

            return(View());
        }