public List <DashboardView> getDashboard(string id)
        {
            var resulta = (from p in context.Patient
                           .Include(pro => pro.Protocol)
                           .ThenInclude(s => s.Session)
                           where p.ProviderId == id
                           select p)
                          .ToList();

            if (resulta != null && resulta.Count > 0)
            {
                List <DashboardView> llist = new List <DashboardView>();
                for (int i = 0; i < resulta.Count; i++)
                {
                    List <PatientRx> lrx = (context.PatientRx.Include(x => x.Provider).Where(x => x.PatientId == resulta[i].PatientId).OrderBy(x => x.RxStartDate).ToList());
                    if (lrx != null && lrx.Count > 0)
                    {
                        DashboardView lview = new DashboardView();
                        lview.PatientRx      = lrx.First();
                        lview.FirstUse       = resulta[i].Session.Count == 0 ? null : resulta[i].Session.Min(t => t.SessionDate);
                        lview.LastUse        = resulta[i].Session.Count == 0 ? null : resulta[i].Session.Max(t => t.SessionDate);
                        lview.MaxPain        = resulta[i].Session.Count == 0 ? 0 : resulta[i].Session.Max(t => t.MaxPain);
                        resulta[i].PatientRx = lrx;
                        lview.Progress       = getProgress(resulta[i]);
                        lview.TotalSession   = resulta[i].Session.Count();
                        llist.Add(lview);
                    }
                }

                llist = llist.Count > 0 ? llist.Where(x => x.PatientRx != null).ToList() : llist;
                return(llist);
            }
            return(null);
        }
示例#2
0
 public void Map(DashboardView model)
 {
     this.StaticContentCommandsJson = JsonConvert.SerializeObject(model.StaticContentCommands, Formatting.Indented);
     this.HomePageInfoJson          = JsonConvert.SerializeObject(model.HomePageInfo, Formatting.Indented);
     this.TriviaMessagesJson        = JsonConvert.SerializeObject(model.TriviaMessages, Formatting.Indented);
     this.Profiles = model.Profiles;
 }
示例#3
0
        private void ShowView(object parameter)
        {
            try
            {
                ValidationMessage = string.Empty;
                MainWindow main = new MainWindow();
                main.Show();
                UserControl view;
                if (parameter == null)
                {
                    view = new POSView();
                }
                else
                {
                    view = new DashboardView();
                }

                Globals.Session.Instance.mainWindow = main;
                main.Show();
                Globals.Session.Instance.SetNextView(view);
            }
            catch (SecurityException)
            {
                ValidationMessage = "You are not authorized!";
            }
        }
示例#4
0
        public void Login()
        {
            //Gebruiker:  Email = "*****@*****.**" / Paswoord = "Gebruiker!123"
            //Admin:  Email = "*****@*****.**" / Paswoord = "Admin!123"
            byte[] data = System.Text.Encoding.ASCII.GetBytes(Paswoord);
            data = new System.Security.Cryptography.SHA256Managed().ComputeHash(data);
            string   hash     = System.Text.Encoding.ASCII.GetString(data);
            Customer customer = unitOfWork.CustomerRepo.Ophalen().Where(x => x.Email == Email && x.Paswoord == hash).FirstOrDefault();

            if (customer != null)
            {
                if (customer.IsAdmin == true)
                {
                    DashboardViewModel vm   = new DashboardViewModel(customer);
                    DashboardAdminView view = new DashboardAdminView();
                    view.DataContext = vm;
                    view.Show();
                    Application.Current.Windows[0].Close();
                }
                else
                {
                    DashboardViewModel vm   = new DashboardViewModel(customer);
                    DashboardView      view = new DashboardView();
                    view.DataContext = vm;
                    view.Show();
                    Application.Current.Windows[0].Close();
                }
            }
            else
            {
                Foutmelding = "Email en/of Paswoord is fout!";
            }
        }
 public ProfilePage(Student s, DashboardView dView)
 {
     InitializeComponent();
     myStudent  = s;
     this.dView = dView;
     LoadInfo();
 }
示例#6
0
        public async Task <IActionResult> GetDashboardInfo()
        {
            try
            {
                var info = new DashboardView();
                info.Customers = await _db.Customers.Count(x => true);

                info.ActiveOrders    = _db.BoardGameRent.PendingRents(x => x.ReturnDate, y => y.ReturnedDate == null);
                info.CompletedOrders = await _db.BoardGameRent.Count(x => x.ReturnedDate != null);

                info.DelayedOrders = _db.BoardGameRent.DelayedRents(x => x.ReturnDate, y => y.ReturnedDate == null);
                info.RentsForToday = (from b in _db.BoardGameRent.GetTodayQuery(x => x.ReturnDate).ToList()
                                      join cus in _db.Customers.GetQueryAll() on b.CustomerId equals cus.Id into customer
                                      select new BoardGameRent
                {
                    BoardGames = b.BoardGames,
                    Days = b.Days,
                    RentDate = b.RentDate,
                    Price = b.Price,
                    Created = b.Created,
                    Id = b.Id,
                    ReturnDate = b.ReturnDate,
                    ReturnedDate = b.ReturnedDate,
                    Customer = customer.FirstOrDefault()
                }).ToList();
                return(Ok(info));
            }
            catch (Exception exc)
            {
                return(BadRequest("Σφαλμα κατα την συλλογή στατιστικών"));
            }
        }
示例#7
0
        public static void Init()
        {
            Version version = Assembly.GetEntryAssembly().GetName().Version;

            object[] objArray1 = new object[] { "v", version.Major, ".", version.Revision };
            VERSION   = string.Concat(objArray1);
            HddSerial = EveAIO.Helpers.GetHardDiskSerialNo();
            if (HddSerial.Length > 0x10)
            {
                HddSerial = HddSerial.Substring(0, 0x10);
            }
            while (HddSerial.Length < 0x10)
            {
                HddSerial = HddSerial + "A";
            }
            EncryptorAes.Key = HddSerial;
            Machine_name     = Environment.UserName;
            EveAIO.Helpers.LoadSettings();
            ViewDashboard     = new DashboardView();
            ViewProfiles      = new ProfilesView();
            ViewLog           = new LogView();
            ViewCaptcha       = new CaptchaView();
            ViewSuccess       = new SuccessView();
            ViewProxy         = new ProxyView();
            ViewNotifications = new NotificationsView();
            ViewSettings      = new SettingsView();
            ViewTools         = new ToolsView();
            CAPTCHA_QUEUE.CollectionChanged += new NotifyCollectionChangedEventHandler(Global.CAPTCHA_QUEUE_CollectionChanged);
            CLIENT = new Client(null, null, false);
            CLIENT.SetDesktopAgent();
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Upgrade-Insecure-Requests", "1");
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Accept-Language", "en-GB, en-US; q=0.9, en; q=0.8");
            CLIENT.Session.DefaultRequestHeaders.TryAddWithoutValidation("Connection", "keep-alive");
        }
示例#8
0
 private void OnChangeData( )
 {
     DashboardView.Refresh( );
     SequenceView.Refresh( );
     SignalView.Refresh( );
     SetControls( );
 }
示例#9
0
        /// <inheritdoc/>
        public override DM.IDock CreateLayout()
        {
            var editorView = new EditorView
            {
                Id    = nameof(EditorView),
                Title = "Editor"
            };

            var dashboardView = new DashboardView
            {
                Id    = nameof(DashboardView),
                Title = "Dashboard"
            };

            var layout = new DMC.RootDock
            {
                Id               = nameof(DMC.IRootDock),
                Title            = "Root",
                ActiveDockable   = dashboardView,
                DefaultDockable  = dashboardView,
                VisibleDockables = CreateList <DM.IDockable>
                                   (
                    dashboardView,
                    editorView
                                   )
            };

            return(layout);
        }
示例#10
0
        public IActionResult CreateIdea(DashboardView data)
        {
            Idea form = data.Idea;

            if (ModelState.IsValid)
            {
                DbContext.Ideas.Add(form);
                DbContext.SaveChanges();
                System.Console.WriteLine("Idea Added");
                return(RedirectToAction("Dashboard"));
            }
            else
            {
                ViewBag.UserId   = HttpContext.Session.GetInt32("UserId");
                ViewBag.UserName = HttpContext.Session.GetString("Name");
                DashboardView view = new DashboardView()
                {
                    AllIdeas = DbContext.Ideas
                               .Include(user => user.Creator)
                               .Include(ideas => ideas.Likes)
                               .ThenInclude(likes => likes.User)
                               .ToList(),
                };
                System.Console.WriteLine("Idea Failed");
                return(View("Dashboard", view));
            }
        }
示例#11
0
        private void OnUserAuthenticated(object sender, AuthenticationEventArgs e)
        {
            UserDto user = e.User;

            ((App)Application.Current).User = user;
            NotesApi.SetToken(user.Token);

            //Label_LoginDebug.Content = string.Format("Logged in as {0}", user.Name);
            //Label_LoginDebug.Visibility = Visibility.Visible;

            //Button_Register.Visibility = Visibility.Collapsed;
            //Button_Login.Visibility = Visibility.Collapsed;

            DashboardViewModel dashboardModel = new DashboardViewModel
            {
                Organizations = new List <OrganizationDto>(),
                Projects      = new List <ProjectDto>(),
                UserNotes     = new List <NoteDto>()
            };

            Home.Grid_NoUser.Visibility   = Visibility.Collapsed;
            Home.Grid_WithUser.Visibility = Visibility.Visible;

            AccountMenu.Login.Visibility    = Visibility.Collapsed;
            AccountMenu.Register.Visibility = Visibility.Collapsed;

            AccountMenu.User.Visibility = Visibility.Visible;

            Dashboard = new DashboardView();
            //MainGrid.Children.Add(Dashboard);
            //MainWindowControls.Visibility = Visibility.Collapsed;
        }
示例#12
0
        /// <inheritdoc/>
        public override IDock CreateLayout()
        {
            var editorView = new EditorView
            {
                Id    = nameof(EditorView),
                Title = "Editor"
            };

            var dashboardView = new DashboardView
            {
                Id    = nameof(DashboardView),
                Title = "Dashboard"
            };

            var layout = new RootDock
            {
                Id          = nameof(IRootDock),
                Title       = "Root",
                CurrentView = dashboardView,
                DefaultView = dashboardView,
                Views       = new ObservableCollection <IView>
                {
                    dashboardView,
                    editorView
                }
            };

            return(layout);
        }
示例#13
0
        public ActionResult Dashboard()
        {
            LayoutView    layoutView    = LayoutView.GetLayoutView();
            DashboardView dashboardView = new DashboardView();

            return(View(dashboardView));
        }
示例#14
0
        public ActionResult Index()
        {
            var people             = db.People.Count();
            var family             = db.Families.Count();
            var yearToDateExpneses = (from t in db.Transactions
                                      join tl in db.TransactionLines on t.Id equals tl.TransactionId
                                      join a in db.AccountCharts on tl.AccountId equals a.Id
                                      where a.Type == AccountChartTypeEnum.Expenses && t.TransactionDate >= _yearPrevious
                                      select(decimal?) tl.Amount).Sum().GetValueOrDefault();

            var yearToDateRevenue = (from t in db.Transactions
                                     join tl in db.TransactionLines on t.Id equals tl.TransactionId
                                     join a in db.AccountCharts on tl.AccountId equals a.Id
                                     where a.Type == AccountChartTypeEnum.Income && t.TransactionDate >= _yearPrevious
                                     select(decimal?) tl.Amount).Sum().GetValueOrDefault();



            var result = new DashboardView()
            {
                People             = people,
                Family             = family,
                YearToDateExpenses = yearToDateExpneses,
                YearToDateRevenue  = yearToDateRevenue * -1
            };

            return(View(result));
        }
        protected override void OnViewControlsCreated()
        {
            base.OnViewControlsCreated();
            Frame.GetController <DashboardCustomizationController>().OrganizeDashboardAction.Active["CustomDashboardViewRootController"] = false;
            IsObjectChanged = false;
            DashboardView DetailView = (View as DashboardView);

            view            = new XafBootstrapView();
            view.IsRootView = true;
            CustomPanel     cp    = new CustomPanel();
            IList <Control> ctrls = new List <Control>();

            foreach (Control control in (DetailView.Control as Control).Controls)
            {
                ctrls.Add(control);
            }

            foreach (var control in ctrls)
            {
                cp.Controls.Add(control);
            }

            view.View            = DetailView;
            view.ControlToRender = cp;
            (View.Control as Control).Controls.Add(view);
        }
示例#16
0
        public static DashboardView GetDashboardView()
        {
            ApplicationDbContext db            = new ApplicationDbContext();
            DashboardView        dashboardView = GetDashboardView(db);

            db.Dispose();
            return(dashboardView);
        }
示例#17
0
 public void GameLoop()
 {
     while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0)
     {
         var dashboard = new DashboardView();
         dashboard.Start();
     }
 }
 public override void SetValue(object component, object value)
 {
     if (_property is Variable)
     {
         (_property as Variable).SetValue(Program.Document.Dashboard.Compiler, (string)value);
         DashboardView.Instance().Refresh();
     }
 }
示例#19
0
        public static DashboardView GetDashboardViewLogin(IPrincipal user)
        {
            ApplicationDbContext db            = new ApplicationDbContext();
            DashboardView        dashboardView = GetDashboardViewLogin(db, user);

            db.Dispose();
            return(dashboardView);
        }
示例#20
0
 public static void MockCreateControls(this DashboardView view)
 {
     foreach (var dashboardViewItem in view.GetItems <DashboardViewItem>())
     {
         dashboardViewItem.CreateControl();
     }
     view.CreateControls();
 }
示例#21
0
        /// <summary>
        /// Obtains all the data that will be displayed in the rendered view
        /// </summary>
        public void Index()
        {
            ViewContext.Dispose();
            DashboardView view = new DashboardView();

            Dashboard data = new Dashboard();

            // get data
            List <Resident> residents = new Entities().Resident.Residents();

            data.TotalResidents      = residents.Count();
            data.MaleResidentCount   = residents.Where(m => m.Sex.ToLower() == "male").Count();
            data.FemaleResidentCount = residents.Where(m => m.Sex.ToLower() == "female").Count();
            data.AliveResidents      = residents.Where(m => m.Status.ToLower() == SystemConstants.RESIDENT_STATUS_ALIVE.ToLower()).Count();
            data.DeceasedResidents   = residents.Where(m => m.Status.ToLower() == SystemConstants.RESIDENT_STATUS_DECEASED.ToLower()).Count();

            // Categ 1 0 to 16
            DateTime below16 = new DateTime(DateTime.Now.Year - 16, DateTime.Now.Month, DateTime.Now.Day);
            // Categ 2 17 to 21
            DateTime seventeen = new DateTime(DateTime.Now.Year - 17, DateTime.Now.Month, DateTime.Now.Day);
            DateTime twentyone = new DateTime(DateTime.Now.Year - 21, DateTime.Now.Month, DateTime.Now.Day);
            // Categ 3 22 to 59
            DateTime twentytwo = new DateTime(DateTime.Now.Year - 22, DateTime.Now.Month, DateTime.Now.Day);
            DateTime fiftynine = new DateTime(DateTime.Now.Year - 59, DateTime.Now.Month, DateTime.Now.Day);
            // Categ 4 Above 60
            DateTime over60 = new DateTime(DateTime.Now.Year - 60, DateTime.Now.Month, DateTime.Now.Day);

            data.AgeRangeCateg1 = residents.Where(m => m.Birthdate >= below16).Count();
            data.AgeRangeCateg2 = residents.Where(m => m.Birthdate <= seventeen && m.Birthdate >= twentyone).Count();
            data.AgeRangeCateg3 = residents.Where(m => m.Birthdate <= twentytwo && m.Birthdate >= fiftynine).Count();
            data.AgeRangeCateg4 = residents.Where(m => m.Birthdate <= over60).Count();

            data.AverageAge = 0;
            foreach (DateTime date in residents.Select(m => m.Birthdate).ToList())
            {
                int age = DateTime.Now.Year - date.Year;
                if (DateTime.Now.DayOfYear < date.DayOfYear)
                {
                    age--;
                }
                data.AverageAge += age;
            }
            data.AverageAge = residents.Count > 0 ? data.AverageAge / residents.Count : 0;

            List <Family> families = new Entities().Family.Families();

            data.RegisteredFamilies = families.Count();
            data.FamilyMemberCateg1 = families.Where(m => m.FamilyMembers <= 2).Count();
            data.FamilyMemberCateg2 = families.Where(m => m.FamilyMembers == 3 || m.FamilyMembers == 4).Count();
            data.FamilyMemberCateg3 = families.Where(m => m.FamilyMembers == 5 || m.FamilyMembers == 6).Count();
            data.FamilyMemberCateg4 = families.Where(m => m.FamilyMembers >= 6).Count();

            view.Dashboard = data;
            view.PopulateBoxes();

            ViewContext.ActiveForm = view;
            ViewContext.ActiveForm.ShowDialog();
        }
        public IActionResult Dashboard(string id)
        {
            ViewBag.HeaderName = "Progress";
            HttpContext.RemoveCookie("ReviewID");
            JsonSerializerSettings lsetting1 = new JsonSerializerSettings();

            lsetting1.ContractResolver      = new CamelCasePropertyNamesContractResolver();
            lsetting1.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;

            try
            {
                if (!string.IsNullOrEmpty(id) || !string.IsNullOrEmpty(HttpContext.Session.GetString("UserId")))
                {
                    string        patientLoginId = !string.IsNullOrEmpty(id) ? id : HttpContext.Session.GetString("UserId");
                    DashboardView lview          = lIPatientRxRepository.getPatientRxByPatientLoginId(patientLoginId);
                    if (lview != null)
                    {
                        //Insert to User Activity Log -Patient
                        JsonSerializerSettings lsetting = new JsonSerializerSettings();
                        lsetting.ReferenceLoopHandling = ReferenceLoopHandling.Ignore;

                        List <EquipmentExercise> lExerciseString = lIEquipmentExerciseRepository.GetEquipmentExerciseString();

                        if (!string.IsNullOrEmpty(lview.PatientRx.DeviceConfiguration))
                        {
                            string _uType = HttpContext.Session.GetString("UserType");
                            if (_uType == "5")
                            {
                                ROMChartViewModel ROM = lIPatientRxRepository.getPatientRxROMChart(lview.PatientRx.PatientId, lview.PatientRx.EquipmentType, lview.PatientRx.DeviceConfiguration);
                                if (ROM != null)
                                {
                                    ViewBag.ROM = ROM;
                                }

                                ViewBag.EquipmentType = lview.PatientRx.EquipmentType;



                                //Treatment Calendar
                                List <TreatmentCalendarViewModel> TreatmentCalendarList = lIPatientRxRepository.getTreatmentCalendar(lview.PatientRx.PatientId, lview.PatientRx.EquipmentType, lview.PatientRx.DeviceConfiguration);
                                if (TreatmentCalendarList != null && TreatmentCalendarList.Count > 0)
                                {
                                    ViewBag.TreatmentCalendar = TreatmentCalendarList;
                                }
                            }
                        }
                    }
                    return(View(lview));
                }
            }
            catch (Exception ex)
            {
                logger.LogDebug("Error: " + ex);
            }

            return(View(null));
        }
示例#23
0
        public ActionResult Dashboard()
        {
            if (!User.Identity.IsAuthenticated)
            {
                return(RedirectToAction("Index", "Home"));
            }

            DashboardView dashboardView = new DashboardView();

            ViewBag.OutstandingTasks    = 0;
            ViewBag.OutstandingActions  = 0;
            ViewBag.OutstandingOffers   = 0;
            ViewBag.Orders              = 0;
            ViewBag.CurrentRequests     = 0;
            ViewBag.CurrentAvailable    = 0;
            ViewBag.RequestsOutstanding = 0;
            ViewBag.RequestsFulfilled   = 0;
            ViewBag.RequestsTotal       = 0;

            if (User.Identity.IsAuthenticated)
            {
                dashboardView = DashboardHelpers.GetDashboardViewLogin(User);
                ViewBag.OutstandingActions = UserActionHelpers.GetActionsForUser(User).Count();
                if (dashboardView.UserTaskList != null)
                {
                    ViewBag.OutstandingTasks = dashboardView.UserTaskList.Count();
                }
                if (dashboardView.RequirementListingList != null)
                {
                    ViewBag.CurrentRequests     = dashboardView.RequirementListingList.Count();
                    ViewBag.RequestsOutstanding = DashboardHelpers.GetRequirementsOutstandingFromDashboardView(dashboardView);
                    ViewBag.RequestsFulfilled   = DashboardHelpers.GetRequirementsFulfilledFromDashboardView(dashboardView);
                    ViewBag.RequestsTotal       = DashboardHelpers.GetRequirementsTotalFromDashboardView(dashboardView);
                }
                if (dashboardView.AvailableListingList != null)
                {
                    ViewBag.CurrentAvailable     = dashboardView.AvailableListingList.Count();
                    ViewBag.AvailableOutstanding = DashboardHelpers.GetAvailableOutstandingFromDashboardView(dashboardView);
                    ViewBag.AvailableFulfilled   = DashboardHelpers.GetAvailableFulfilledFromDashboardView(dashboardView);
                    ViewBag.AvailableTotal       = DashboardHelpers.GetAvailableTotalFromDashboardView(dashboardView);
                }
                if (dashboardView.OfferList != null)
                {
                    ViewBag.OutstandingOffers = dashboardView.OfferList.Count();
                }
                if (dashboardView.OrderList != null)
                {
                    ViewBag.Orders = dashboardView.OrderList.Count();
                }
            }
            else
            {
                dashboardView = DashboardHelpers.GetDashboardView();
            }

            return(View(dashboardView));
        }
示例#24
0
        public void LoadDashboardView()
        {
            DashboardView       subView           = new DashboardView();
            DashboardController subViewController = new DashboardController(subView);

            subViewController.LoadView();

            view.AddControlToMainPanel(subView);
        }
示例#25
0
        //[Authorize]
        public ActionResult Index()
        {
            var data = new DashboardView();

            data.myProjects = db.Projects.ToList();
            data.myTickets  = db.Tickets.ToList();
            data.myUsers    = db.Users.ToList();
            return(View(data));
        }
示例#26
0
        public IActionResult Index()
        {
            //Set the role for the user; This is accessed by the layout page to display role to the user.
            if (ClaimsLoader.IsInGroup(User, _config.GetValue <string>("Admin")))
            {
                ClaimsLoader.Role = "Administrator"; //THIS IS USED BY LAYOUT TO HANDLE WHICH LINKS APPEAR TO THE USER.
            }
            else if (ClaimsLoader.IsInGroup(User, _config.GetValue <string>("Modify")))
            {
                ClaimsLoader.Role = "Modify";
            }
            else
            {
                ClaimsLoader.Role = "";
            }

            List <Circuit>      circuits     = _context.Circuit.ToList();
            List <DiscoCircuit> discoCircuit = _context.DiscoCircuits.ToList();
            List <Software>     soft         = _context.Software.ToList();
            List <Circuit>      last30       = new List <Circuit>();
            List <DiscoCircuit> last30Disco  = new List <DiscoCircuit>();
            List <Software>     last30Soft   = new List <Software>();

            foreach (var item in circuits)
            {
                if ((item.Date - DateTime.UtcNow).TotalDays > -30)
                {
                    last30.Add(item);
                }
            }
            foreach (var item in discoCircuit)
            {
                if ((item.Date - DateTime.UtcNow).TotalDays > -30)
                {
                    last30Disco.Add(item);
                }
            }
            foreach (var item in soft)
            {
                if ((item.added - DateTime.UtcNow).TotalDays > -30)
                {
                    last30Soft.Add(item);
                }
            }
            DashboardView newdash = new DashboardView
            {
                RecentCircuit = last30,
                RecentDisco   = last30Disco,
                RecentSoft    = last30Soft
            };


            return(View(newdash));
        }
示例#27
0
        protected override void OnStartup(StartupEventArgs e)
        {
            IUnityContainer container = new UnityContainer();

            container.RegisterType <IDashboardModel, DashboardModel>();
            container.RegisterType <IDashboadViewModel, DashboardViewModel>();

            DashboardView dashboardView = container.Resolve <DashboardView>();

            dashboardView.Show();
        }
示例#28
0
 protected override void OnViewLoaded(object view)
 {
     base.OnViewLoaded(view);
     this.view = (DashboardView)view;
     
     
     Dashboard.PropertyChanged += Dashboard_PropertyChanged;
     Dashboard.DashboardChanged += Dashboard_DashboardChanged;
     Dashboard.Activated += Dashboard_Activated;
     UpdateScreen();
 }
示例#29
0
        public static decimal GetRequirementsOutstandingFromDashboardView(DashboardView view)
        {
            decimal value = 0;

            foreach (RequirementListing requirement in view.RequirementListingList)
            {
                value += requirement.QuantityOutstanding;
            }

            return(value);
        }
示例#30
0
        public static decimal GetAvailableTotalFromDashboardView(DashboardView view)
        {
            decimal value = 0;

            foreach (AvailableListing available in view.AvailableListingList)
            {
                value += available.QuantityRequired;
            }

            return(value);
        }
示例#31
0
        public static decimal GetAvailableOutstandingFromDashboardView(DashboardView view)
        {
            decimal value = 0;

            foreach (AvailableListing available in view.AvailableListingList)
            {
                value += available.QuantityOutstanding;
            }

            return(value);
        }
示例#32
0
 public static IModelDashboardViewItem GetModel(this DashboardViewItem item, DashboardView view) {
     return (IModelDashboardViewItem)view.Model.Items[item.Id];
 }