public ActionResult StorageInventory() { var dashboardBLL = new DashboardBLL(); List <Product> productsInShop = dashboardBLL.GetAllProductsInTheInventory(); return(View(productsInShop)); }
public JsonResult Input(string year = "") { Dashboard dashboard = DashboardBLL.ThongKeTienTheoNam(Convert.ToInt32(year)); dashboard.Year = Convert.ToInt32(year); return(Json(new { result = dashboard }, JsonRequestBehavior.AllowGet)); }
// GET: Dashboard /// <summary> /// thống kê theo năm /// </summary> /// <returns></returns> public ActionResult Index() { Dashboard dashboard = new Dashboard(); dashboard = DashboardBLL.ThongKeTienTheoNam(2020); dashboard.Year = Convert.ToInt32(2020); return(View(dashboard)); }
/// <summary> /// 今日营收总览,获取上一个营业日期的现金数与当前营业日期的现金数进行环比查询 /// </summary> /// <param name="dicParas">请求参数字典</param> /// <returns></returns> public object mom() { MOMModel model = DashboardBLL.GetMOM(); ResponseModel <MOMModel> responseModel = new ResponseModel <MOMModel>(); responseModel.Result_Data = model; return(responseModel); }
/// <summary> /// 今日营收分析 /// </summary> /// <param name="dicParas">请求参数字典</param> /// <returns></returns> public object todayRevenue() { TodayRevenueModel model = DashboardBLL.GetTodayRevenue(); ResponseModel <TodayRevenueModel> responseModel = new ResponseModel <TodayRevenueModel>(); responseModel.Result_Data = model; return(responseModel); }
/// <summary> /// Bind Reacent paps data /// </summary> private void GetRecentPAPS() { DashboardBLL objRecentPAPSLogic = new DashboardBLL(); DSH_RecentPAPSList RecentPAPS = objRecentPAPSLogic.GetRecentPAPSByUser(Convert.ToInt32(Session["USER_ID"])); rptRecentPAPS.DataSource = RecentPAPS; rptRecentPAPS.DataBind(); }
/// <summary> /// 今日吧台营收 /// </summary> /// <returns></returns> public object todayBarCounterRevenue() { List <TodayBarCounterRevenueModel> model = DashboardBLL.GetTodayBarCounterRevenue().OrderByDescending(g => g.TotalMoney).ToList <TodayBarCounterRevenueModel>(); ResponseModel <List <TodayBarCounterRevenueModel> > responseModel = new ResponseModel <List <TodayBarCounterRevenueModel> >(); responseModel.Result_Data = model; return(responseModel); }
/// <summary> /// Date Created: 11/11/2011 /// Created By: Gabriel Oquialda /// (description) vehicle dashboard details /// </summary> private void GetDashboardDetails() { DataView dv = null; DataTable dt = DashboardBLL.GetVehicleDashboardDetails(GlobalCode.Field2String(Session["UserBranchID"]), GlobalCode.Field2DateTime(Session["DateFrom"]).ToString(), GlobalCode.Field2String(Session["DateTo"])); dv = dt.DefaultView; uoListViewDashboard.DataSource = dv; uoListViewDashboard.DataBind(); }
public static void Init() { string connectionString = ConfigurationManager.ConnectionStrings["LiteCommerce"].ConnectionString; //TODO khởi tạo các BLL khi sử dụng đến CataLogBLL.Initialize(connectionString); UserAccountBLL.Initialize(connectionString); DashboardBLL.Initialize(connectionString); }
// GET: Dashboard public ActionResult ShopInventory() { if (true) //role check { } var dashboardBLL = new DashboardBLL(); List <Product> productsInShop = dashboardBLL.GetAllProductsInTheShop(); return(View(productsInShop)); }
private void GetDashboardDetails() { DataView dv = null; DataTable dt = DashboardBLL.GetHotelDashboardDetails(Session["UserBranchID"].ToString(), GlobalCode.Field2DateTime((GlobalCode.Field2String(Session["DateFrom"]))).ToString(), GlobalCode.Field2String(Session["DateTo"])); dv = dt.DefaultView; //dv.Sort = uoDropDownListGroup.SelectedValue; uoListViewDashboard.DataSource = dv; uoListViewDashboard.DataBind(); }
private void GetDashboardDetailsWeek() { DataView dv = null; DataTable dt = DashboardBLL.GetHotelDashboardDetailsWeek(Session["UserBranchID"].ToString()); dv = dt.DefaultView; //dv.Sort = uoDropDownListGroup.SelectedValue; uoListViewDashboard2.DataSource = dv; uoListViewDashboard2.DataBind(); }
/// <summary> /// /// </summary> public static void Initialize() { string connectionString = ConfigurationManager.ConnectionStrings["LiteCommence"].ConnectionString; CatalogBLL.Initialize(connectionString); HumanResourceBLL.Initialize(connectionString); AccountBLL.Initialize(connectionString); UserAccountBLL.Initialize(connectionString); SaleManagementBLL.Initialize(connectionString); DashboardBLL.Initialize(connectionString); //WebSecurity.InitializeDatabaseConnection(connectionString, "TableName", "ColumnId", "ColumnName", autoCreateTables: false); //TODO:bổ sùng khởi tạo các BLL khác khi cần sử dụng }
/// <summary> /// Bind Chart data for Spiline /// </summary> private void GetPAPStatusSpline() { DashboardBLL objPAPStatusLogic = new DashboardBLL(); DSH_PAPStatusList PAPStatusList = objPAPStatusLogic.GetProjectwisePAPBudgetForSpline(Convert.ToInt32(drpProject.SelectedValue)); ProjectStatusSplineChart.Series["Series1"].Points.AddXY(0, 0); ProjectStatusSplineChart.Series["Series2"].Points.AddXY(0, 0); for (int i = 0; i < PAPStatusList.Count; i++) { ProjectStatusSplineChart.Series["Series1"].Points.AddXY(i + 1, PAPStatusList[i].est_value); ProjectStatusSplineChart.Series["Series2"].Points.AddXY(i + 1, PAPStatusList[i].expenseamount); } //ProjectStatusSplineChart.Series["Series1"].Points.AddXY(1, 5); //ProjectStatusSplineChart.Series["Series1"].Points.AddXY(2, 15); //ProjectStatusSplineChart.Series["Series1"].Points.AddXY(3, 10); //ProjectStatusSplineChart.Series["Series2"].Points.AddXY(0, 0); //ProjectStatusSplineChart.Series["Series2"].Points.AddXY(1, 10); //ProjectStatusSplineChart.Series["Series2"].Points.AddXY(2, 8); //ProjectStatusSplineChart.Series["Series2"].Points.AddXY(3, 20); for (int i = 0; i < PAPStatusList.Count + 1; i++) { CustomLabel lbl = new CustomLabel(); if (i == 0) { lbl.Text = ""; } else { lbl.Text = PAPStatusList[i - 1].BudDate.Substring(0, 3); } //else if (i == 1) // lbl.Text = "Feb"; //else if (i == 2) // lbl.Text = "Mar"; //else if (i == 3) // lbl.Text = "Apr"; lbl.FromPosition = i - 0.5; lbl.ToPosition = i + 0.5; ProjectStatusSplineChart.ChartAreas[0].AxisX.CustomLabels.Add(lbl); ProjectStatusSplineChart.ChartAreas[0].AxisX.LabelStyle.Angle = -90; } ProjectStatusSplineChart.ChartAreas["ChartArea1"].AxisX.IsStartedFromZero = true; ProjectStatusSplineChart.ChartAreas["ChartArea1"].AxisX.Minimum = 0; ProjectStatusSplineChart.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false; ProjectStatusSplineChart.ChartAreas["ChartArea1"].AxisY.MajorGrid.LineColor = Color.LightGray; }
public static string NotificationsByGroup(int groupId, string starttime, string endtime) { DashboardBLL obj = new DashboardBLL(); starttime = starttime.Replace(',', ' '); DateTime sttime = DateTime.Parse(starttime); endtime = endtime.Replace(',', ' '); DateTime edtime = DateTime.Parse(endtime); var objects = obj.getCustomNotificationbyGroup(groupId, sttime, edtime); if (objects.Count > 0) { string result = JsonConvert.SerializeObject(objects); return(result); } return(""); }
public static List <SelectListItem> Years(bool allowSelectAll = true) { List <SelectListItem> list = new List <SelectListItem>(); if (allowSelectAll) { foreach (int year in DashboardBLL.Year()) { list.Add(new SelectListItem() { Value = year.ToString(), Text = year.ToString() }); } } return(list); }
/// <summary> /// =============================================== /// Author: Muhallidin G Wali /// Date Created: 11/04/2012 /// Description: export Exception Bookings to excel /// =============================================== /// Modified By: Josephine Gad /// Date Modified: 07/Jan/2013 /// Description: Use table instead of list using DashboardBLL.LoadHotelDashboardConfirmedExport /// =============================================== /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void uoBtnExportList_Click(object sender, EventArgs e) { uoHiddenFieldFromDefaultView.Value = "0"; DataTable dt = null; try { //List<ConfirmBooking> list = new List<ConfirmBooking>(); //list = (List<ConfirmBooking>)Session["HotelDashboardClass_ConfirmBooking"]; //if (list.Count > 0) //{ // if (list.Count > 20) // ExportException(list); // else // ExportException(list); //} dt = DashboardBLL.LoadHotelDashboardConfirmedExport(uoHiddenFieldUser.Value, GlobalCode.Field2Int(uoHiddenFieldBranchId.Value)); if (dt != null) { if (dt.Rows.Count > 0) { CreateFile(dt); } } else { AlertMessage("There is no record to export."); } } catch (Exception ex) { throw ex; } finally { if (dt != null) { dt.Dispose(); } } }
/// <summary> /// Bind Chart data for Bar /// </summary> private void GetPAPStatus() { DashboardBLL objPAPStatusLogic = new DashboardBLL(); PAPStatusChart.Series["Series1"].XValueMember = "ProjectName"; PAPStatusChart.Series["Series1"].YValueMembers = "PAPCount"; PAPStatusChart.Series["Series2"].XValueMember = "ProjectName"; PAPStatusChart.Series["Series2"].YValueMembers = "PAPPaidCount"; PAPStatusChart.Series["Series3"].XValueMember = "ProjectName"; PAPStatusChart.Series["Series3"].YValueMembers = "PAPPendingPayCount"; //PAPStatusChart.Series["Series1"]["PixelPointWidth"] = "20"; //PAPStatusChart.Series["Series2"]["PixelPointWidth"] = "20"; //PAPStatusChart.Series["Series3"]["PixelPointWidth"] = "20"; //PAPStatusChart.ChartAreas["ChartArea1"].AxisX.IntervalAutoMode = IntervalAutoMode.FixedCount; PAPStatusChart.ChartAreas["ChartArea1"].AxisY.MajorGrid.LineColor = Color.LightGray; PAPStatusChart.ChartAreas["ChartArea1"].AxisX.MajorGrid.Enabled = false; PAPStatusChart.DataSource = objPAPStatusLogic.GetProjectwisePAPStatus(Convert.ToInt32(drpProject.SelectedValue)); PAPStatusChart.DataBind(); }
/// <summary> /// Bind Chart data for Pie /// </summary> private void GetPAPStatusPie() { DashboardBLL objPAPStatusLogic = new DashboardBLL(); //ProjectStatusPieChart.Legends.Add(new Legend("ProjectStatus")); ProjectStatusPieChart.Series[0].XValueMember = "ProjectStatus"; ProjectStatusPieChart.Series[0].YValueMembers = "StatuCount"; ProjectStatusPieChart.Series[0].Label = "#PERCENT{P0}"; ProjectStatusPieChart.Series[0].Font = new Font("Segoe UI", 8.0f, FontStyle.Bold); ProjectStatusPieChart.Series[0].Legend = "ProjectStatus"; DSH_PAPStatusList PAPStatusList = objPAPStatusLogic.GetProjectwisePAPStatusForPie(); ProjectStatusPieChart.DataSource = PAPStatusList; ProjectStatusPieChart.DataBind(); for (int i = 0; i < PAPStatusList.Count; i++) { DataPoint pt = ProjectStatusPieChart.Series[0].Points[i]; if (PAPStatusList[i].ProjectStatus.ToString().ToUpper() == "IN PROGRESS") { pt.LegendText = "In Progress"; pt.Color = Color.Orange; } else if (PAPStatusList[i].ProjectStatus.ToString().ToUpper() == "COMPLETED") { pt.LegendText = "Completed"; pt.Color = Color.Green; } else if (PAPStatusList[i].ProjectStatus.ToString().ToLower() == "new") { pt.LegendText = "New"; pt.Color = Color.Blue; } else { pt.LegendText = PAPStatusList[i].ProjectStatus.ToString(); } } }
/// <summary> /// 今日客流分析 /// </summary> /// <returns></returns> public object todayPassengerFlow() { List <PassengerFlowModel> listMode = DashboardBLL.GetTodayPassengerFlow(); string[] hourArr = new string[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24" }; List <PassengerFlowModel> list = new List <PassengerFlowModel>(); foreach (string hour in hourArr) { PassengerFlowModel model = new PassengerFlowModel(); var hourObj = listMode.Where <PassengerFlowModel>(p => p.HourField == Convert.ToInt32(hour).ToString()); model.HourField = hour; if (hourObj != null && hourObj.ToList <PassengerFlowModel>().Count > 0) { model.PassengerCount = hourObj.ToList <PassengerFlowModel>()[0].PassengerCount; } list.Add(model); } ResponseModel <List <PassengerFlowModel> > responseModel = new ResponseModel <List <PassengerFlowModel> >(); responseModel.Result_Data = list; return(responseModel); }
protected void LoadDashboardDetails() { DataTable dashboardDataTable = null; try { dashboardDataTable = DashboardBLL.GetPortAgentPortDashboardDetails(Session["UserBranchID"].ToString(), GlobalCode.Field2DateTime(GlobalCode.Field2String(Session["DateFrom"])).ToString(), GlobalCode.Field2String(Session["DateTo"])); uoDashboardList.Items.Clear(); uoDashboardList.DataSource = dashboardDataTable; uoDashboardList.DataBind(); } catch (Exception ex) { throw ex; } finally { if (dashboardDataTable != null) { dashboardDataTable.Dispose(); } } }
/*Get Notification*/ public DataTable GetNotification(DashboardBLL objDBLL) { query = "select * from Notification order by NotificationID DESC"; return(objDBManager.ExecuteDataTable(query)); }
/*Project Work*/ public void SaveProjects(DashboardBLL objDBLL, int studentid) { query = "insert into Project(ProjectTopic,ProjectType)values('" + objDBLL.ProjectTitle + "','" + objDBLL.ProjectType + "')Update Student set ProjectID=SCOPE_IDENTITY() where UserID='" + studentid + "'"; objDBManager.ExecuteNonQuery(query); }
public DataTable GetStudents(DashboardBLL objDBLL) { query = " SELECT Users.UserID,Users.FirstName,Users.LastName,Users.Email,Users.UserName,Users.Password,Users.UserType,Users.Gender,Student.StudentID,Student.ContactNo,Student.Department,Student.Info FROM Users FULL OUTER JOIN Student ON Users.UserID=Student.StudentID where Users.UserType='Student'"; return(objDBManager.ExecuteDataTable(query)); }
/*Student Info*/ public void SaveStudents(DashboardBLL objDBLL) { query = "insert into Users(FirstName,LastName,Email,Password,UserName,UserType,Gender)values('" + objDBLL.FirstName + "','" + objDBLL.LastName + "','" + objDBLL.Email + "','" + objDBLL.Password + "','" + objDBLL.UserName + "','" + objDBLL.UserType + "','" + objDBLL.Gender + "') insert into Student(ContactNo,Department,Batch,Info,UserID) values('" + objDBLL.ContactNo + "','" + objDBLL.Department + "','" + objDBLL.Batch + "','" + objDBLL.Info + "',SCOPE_IDENTITY())"; objDBManager.ExecuteNonQuery(query); }
public ActionResult TotalStatisticalOrder(DateTime timeStart, DateTime timeEnd, string country) { timeEnd = timeEnd.AddMonths(1).AddDays(-1); return(Json(DashboardBLL.DashBoard_GetTotalStatisticalOrder(timeStart, timeEnd, country), JsonRequestBehavior.AllowGet)); }
public ActionResult CountryUnitPrice(DateTime timeStart, DateTime timeEnd, string country) { timeEnd = timeEnd.AddMonths(1).AddDays(-1); return(Json(DashboardBLL.DashBoard_GetCountryUnitPrice(timeStart, timeEnd, country), JsonRequestBehavior.AllowGet)); }
/// <summary> /// 获取小窗口钻取的查询结果 /// </summary> /// <param name="userId"></param> /// <param name="para"></param> /// <returns></returns> public QueryResultDto GetResultWidgetDrill(long userId, QueryWidgetDrillParaDto para) { QueryResultDto result = new QueryResultDto(); int count = 0; string sql = new DashboardBLL().GetWidgetDrillSql(para.widget_id, para.group1, para.group2, para.order_by, userId, out count); // 获取查询sql语句 result.count = count; result.query_type_id = para.query_type_id; result.para_group_id = para.para_group_id; if (count == 0) // 查询记录总数为0 { return(result); } // 计算分页信息 if (para.page_size == 0) { para.page_size = _pageSize; } int totalPage = count / para.page_size; if (count % para.page_size != 0) { ++totalPage; } if (para.page <= 0) { para.page = 1; } if (para.page > totalPage) { para.page = totalPage; } int offset = (para.page - 1) * para.page_size; // 获取查询结果 sql = sql + $" LIMIT {offset},{para.page_size}"; var table = new sys_query_type_user_dal().ExecuteDataTable(sql); List <Dictionary <string, object> > list = new List <Dictionary <string, object> >(); foreach (DataRow row in table.Rows) { Dictionary <string, object> column = new Dictionary <string, object>(); foreach (DataColumn col in table.Columns) { column.Add(col.ColumnName, row[col.ColumnName]); } list.Add(column); } result.order_by = para.order_by; result.page = para.page; result.page_count = totalPage; result.page_size = para.page_size; //result.query_id = queryId; result.query_id = ""; result.result = list; return(result); }
public DashboardDataController(DataContext context) { dashboardBLL = new DashboardBLL(context); }