public ActionResult Create(DDB_HDC_OFFICEINFO officeInfo)
        {
            ViewBag.OfficeName = new SelectList(dbOffice.DDB_HDC_OFFICEINFO.Where(x => x.OfficeName != null).OrderBy(x => x.OfficeName), "RSCDB", "OfficeName");
            var products = db.Products.ToList();
            var lots     = db.Lots.ToList();

            return(View(officeInfo));
        }
        public ActionResult Allocate(DDB_HDC_OFFICEINFO officeInfo)
        {
            var user     = HDUtilities.UserInformation.GetCurrentUserName();
            var ordProds = dbIT.OrderProducts.Where(r => r.LastEditUser == user && r.Order.Submitted != true).ToList();

            ViewBag.orderProducts = new SelectList(ordProds.Where(r => r.LastEditUser == user && r.Order.Submitted != true));

            List <DDB_HDC_OFFICEINFO> officeModel = new List <DDB_HDC_OFFICEINFO>();

            var offices = dbOfficeInfo.DDB_HDC_OFFICEINFO;

            officeModel = offices.Where(r => r.OfficeType != "Closed" && r.OfficeType != "Merged" && r.OfficeType != "Sold" && r.SpeedDial != null).ToList().Select(
                x => new DDB_HDC_OFFICEINFO()
            {
                OfficeName = "(" + x.SpeedDial + ") " + x.OfficeName,
                RSCDB      = x.RSCDB,
                SpeedDial  = x.SpeedDial
            }).ToList();

            ViewBag.OfficeName = new SelectList(officeModel.Where(x => x.OfficeName != null).OrderBy(x => x.SpeedDial), "RSCDB", "OfficeName");

            return(View(officeInfo));
        }