// // GET: /DashBoard/ public ActionResult Index() { try { List <cDailyQuotes> objDailyQuet = cDailyQuotes.Find(); DashBoardView objDashView = new DashBoardView(); objDashView.objNews = GetNews(); objDashView.objAssignProject = GetAssignProject(); objDashView.objBirthDay = GetBirthday(); objDashView.objNewJoinee = GetNewJoinee(); objDashView.objPendingLeave = GetPendingLeave(); if (objDailyQuet.Count > 0) { objDashView.DailyQuates = objDailyQuet[0].sName; } else { objDashView.DailyQuates = ""; } return(View(objDashView)); } catch (Exception ex) { throw ex; } }
public ActionResult GetDosareDashboardRegular() { string conStr = Session["conStr"].ToString(); //ConfigurationManager.ConnectionStrings["MySQLConnectionString"].ConnectionString; Utilizator u = (Utilizator)Session["CURENT_USER"]; DashBoardView dbv = new DashBoardView(u, conStr, Convert.ToInt32(Session["ID_SOCIETATE"]), 2); //return PartialView("_DosareDashboardRegular", des.ToArray()); return(PartialView("_DosareDashboardRegular", dbv)); }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); //Application.Run(new DashBoardView()); DashBoardView view = new DashBoardView(); DashBoardController controller = new DashBoardController(view); view.ShowDialog(); }
public MainPage(Login user, Window window) { InitializeComponent(); this.window = window; this.user = user; DockGrid.DataContext = this.user; if (user.role.Equals("admin")) { DataContext = new DashBoardView(this); formButton.Visibility = System.Windows.Visibility.Visible; } else { DataContext = new ProfileView(user); } }
public mainPage(Login user, LoginWindow parent) { InitializeComponent(); this.parent = parent; this.user = user; userName.Content = user.user_name; userId.Content = user.emp_id; userRole.Content = user.role; if (user.role.Equals("admin")) { DataContext = new DashBoardView(); dashButtton.Visibility = System.Windows.Visibility.Visible; formButton.Visibility = System.Windows.Visibility.Visible; } else { DataContext = new FormView(user); } }
public IActionResult Index( string sortOrder, string currentFilter, string searchString, int?page ) { ViewData["ControllerName"] = "ADMIN/DASHBOARD"; ViewBag.AreaName = "Roles & Permission"; ViewData["CurrentSort"] = sortOrder; ViewData["NameSortParm"] = string.IsNullOrEmpty(sortOrder) ? "name_desc" : ""; ViewData["NumberOfUserSortParm"] = sortOrder == "NumberOfUser" ? "numberOfUser" : "NumberOfUser"; if (searchString != null) { page = 1; } else { searchString = currentFilter; } ViewData["CurrentFilter"] = searchString; var sales = ReturnSales(searchString); var orders = ReturnOrders(searchString); var expression = ReturnExpressionOfInterest(searchString); var customer = ReturnCustomer(searchString); var dashboard = new DashBoardView(); dashboard.RecentOrders = ReturnPurchese(searchString).OrderByDescending(s => s.AddToCartDate).Take(50).ToList(); dashboard.Customers = TransfromerManager.IntegerHuamanized(customer); dashboard.Sales = TransfromerManager.DecimalHumanizedX(sales); dashboard.Orders = TransfromerManager.IntegerHuamanized(orders); dashboard.ExpressionOfINterest = TransfromerManager.IntegerHuamanized(expression); return(View(dashboard)); }
private void switchToDashBoard(object sender, RoutedEventArgs e) { formButton.Visibility = System.Windows.Visibility.Visible; dashButtton.Visibility = System.Windows.Visibility.Hidden; DataContext = new DashBoardView(); }
public void setDashBoardView(DashBoardView _dashBoardView) { dashboardView = _dashBoardView; }