public DashboardDTO GetDashboardData(DateTime?selectedDate = null) { var todayPurchases = GetAllDaily(selectedDate); var todaySalesinvoice = _salesinvoicesOperationsRepo.GetAllDaily(selectedDate); decimal total = CalculateTotalPurchase(todayPurchases); decimal totalSalesinvoice = CalculateTotalSalesinvoice(todaySalesinvoice); DashboardDTO dashboardDTO = new DashboardDTO() { //TotalPurchase = todayPurchases.Sum(x => Math.Ceiling(x.Total)),// + todayPurchases.Sum(x => x.Commission)+todayPurchases.Sum(x => x.Gift)+ todayPurchases.Sum(x => x.Descent)), TotalPurchase = total, TotalCommission = (todayPurchases.Sum(x => Math.Ceiling(x.Commission))), TotalGift = todayPurchases.Sum(x => Math.Ceiling(x.Gift)), TotalDescent = todayPurchases.Sum(x => Math.Ceiling(x.Descent)), TotalSalesinvoice = totalSalesinvoice,//todaySalesinvoice.Sum(x => Math.Ceiling(x.Total)), //CalculateTotalSalesinvoice(todaySalesinvoice), TotalQuantity = todaySalesinvoice.Sum(x => x.SalesinvoicesDetialsList.Sum(y => y.Quantity)), TotalSalesWeight = todaySalesinvoice.Sum(x => x.SalesinvoicesDetialsList.Sum(y => y.Weight)), TotalPurchaseWeight = todayPurchases.Sum(x => x.PurechasesDetialsList.Sum(y => y.Weight)) }; //dashboardDTO.TotalPurchase += dashboardDTO.TotalCommission + dashboardDTO.TotalGift + dashboardDTO.TotalDescent; return(dashboardDTO); }
public ActionResult Get_Dashboard_ID(int Id) { if (Id == 2000) { DashboardDTO dto_dashboard = new DashboardDTO(); dto_dashboard.Id = 2000; dto_dashboard.Title = "Electricity"; dto_dashboard.Dashboard_Widgets = new List <Dashboard_Widget_DTO>(); return(View(dto_dashboard)); // return PartialView("_Dashboard_Fixed_Chart"); } else if (Id == 2001) { DashboardDTO dto_dashboard = new DashboardDTO(); dto_dashboard.Id = 2001; dto_dashboard.Title = "KPI Overview"; dto_dashboard.Dashboard_Widgets = new List <Dashboard_Widget_DTO>(); return(View(dto_dashboard)); // return PartialView("_Dashboard_Fixed_Gauge"); } else { DashboardDTO dto_dashboard = _dashboardRepository.Get_Dashboard_By_Id(Id); return(View(dto_dashboard)); } }
public async Task <IActionResult> UpdateFirmAsync(DashboardDTO dashboardDTO, int Id) { if (!ModelState.IsValid) { return(BadRequest(ModelState.GetErrorMessage())); } else { IDataResult <Dashboard> DashboardResult = await _Dashboardservice.FindByIdAsync(Id); if (DashboardResult == null) { return(BadRequest(DashboardResult.Message)); } _mapper = DashboardMapping.GetMapper().CreateMapper(); Dashboard dashboard = _mapper.Map <DashboardDTO, Dashboard>(dashboardDTO); var Dashboardresult = await _Dashboardservice.AddAsync(dashboard); if (Dashboardresult.Success) { return(Ok(Dashboardresult.Message)); } else { return(BadRequest(Dashboardresult.Message)); } } }
private void Button1_Click(object sender, EventArgs e) { //1 DashboardDTO tempDTO = new DashboardDTO(); if (!String.IsNullOrWhiteSpace(textBox4.Text)) { tempDTO.NAME = textBox4.Text; } IList <DashboardDTO> resultList = DashboardDAO.SelectList(tempDTO); // 2 //IList<DashboardDTO> resultList2 = DashboardDAO.SelectList(new DashboardDTO() { NAME = textBox4.Text }); //MessageBox.Show(resultList[0].NAME); //textBox1.Text = resultList[0].NAME; //textBox2.Text = resultList[0].AGE; //textBox3.Text = resultList[0].DEPT; dataGridView1.DataSource = resultList; }
public DashboardDTO GetInfoDashboard() { var dashboard = new DashboardDTO(); var contractsList = UnitOfWork.GetRepository <Contracts>().GetAll().ToList(); var paymentsList = UnitOfWork.GetRepository <Payment>().GetAll().Where(s => s.isDelete == false).ToList(); dashboard.TotalContract = contractsList.Count; dashboard.TotalActiveContract = contractsList.Where(s => s.IsDelete == false).Count(); dashboard.TotalPaymentContract = paymentsList.Where(p => p.Type == PaymentTypeEnum.Contract && p.isDelete == false).Count(); dashboard.TotalPaymentWaterContract = paymentsList.Where(p => p.Type == PaymentTypeEnum.Water && p.isDelete == false).Count(); double totalContract = 0.0; paymentsList.Where(p => p.Type == PaymentTypeEnum.Contract && p.isDelete == false).ToList().ForEach(c => { totalContract += c.Amount; }); dashboard.TotalPaymentConstractCost = totalContract; double totalWater = 0.0; paymentsList.Where(p => p.Type == PaymentTypeEnum.Water && p.isDelete == false).ToList().ForEach(c => { totalWater += c.Amount; }); dashboard.TotalPaymentWaterCost = totalWater; dashboard.ContractList = GetContractResume(contractsList, paymentsList); return(dashboard); }
public DashboardDTO GetDashboardDetails() { DateTime saleDate = DateTime.Now.Date; DashboardDTO dashboardDTO = unitOfWork.DashboardRepository.GetDashBoardDetails(saleDate); return(dashboardDTO); }
public DashboardDTO GetDashboard() { DashboardDTO result = new DashboardDTO(); result.TotalReportNotYetAssigned = _repository.TotalReportNotYetAssigned(); result.TotalReportNotYetCommented = _repository.TotalReportNotYetCommented(); result.TotalReportThisMonth = _repository.TotalReportThisMonth(); result.TotalReportThisYear = _repository.TotalReportThisYear(); return(result); }
private void Button2_Click(object sender, EventArgs e) { DashboardDTO tempDTO = new DashboardDTO(); tempDTO.NAME = textBox1.Text; tempDTO.AGE = textBox2.Text; tempDTO.DEPT = textBox3.Text; DashboardDTO resultDTO = DashboardDAO.InsertCompany(tempDTO); MessageBox.Show(resultDTO.isSuccess.ToString()); }
public DashboardDTO GetUserDashboard(int?userId) { DashboardDTO dashboard = new DashboardDTO(); dashboard.Projects = _projectRepository.GetAllUserProjects(userId.Value).Select(project => new ProjectDTO() { Id = project.Id, Name = project.Name, Description = project.Description }).ToList(); return(dashboard); }
public HttpResponseMessage Getdashboard(string AssociateID) { try { DashboardDTO dashboardDTO = userAndRole.GetDashboardList(AssociateID); return(Request.CreateResponse(HttpStatusCode.OK, dashboardDTO)); } catch (Exception) { throw new HttpResponseException(HttpStatusCode.InternalServerError); } }
public ActionResult Add_Edit_Dashboard(int dashboard_id) { if (dashboard_id > 0) { DashboardDTO dashboard_DTO = _dashboardRepository.Get_Dashboard_By_Id(dashboard_id); return(PartialView("_AddEditDashBoard", dashboard_DTO)); } else { return(PartialView("_AddEditDashBoard", new DashboardDTO())); } }
public async Task <IActionResult> GetDashboard() { var projects = await _dbContext.Projects.ToListAsync(); var dashboardDTO = new DashboardDTO { UserName = "******", Projects = projects }; return(Ok(dashboardDTO)); }
public IActionResult Update(DashboardDTO dashboardDto) { _mapper = DashboardMapping.GetMapper().CreateMapper(); Dashboard dashboard = _mapper.Map <DashboardDTO, Dashboard>(dashboardDto); var result = _Dashboardservice.Update(dashboard); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Success.ToString() + "and " + result.Message)); }
public DashboardDTO GetResults() { var dataAtual = DateTime.Now.Date; var inicioCampanha = new DateTime(2018, 8, 1); var finalCampanha = new DateTime(2019, 1, 30); var result = new DashboardDTO(); result.DadosUsuarios = new List <ResultadosUsuario>(); result.TotalDrogariasContactadas = _ctx.Cliente.Include(x => x.Contatousuariocampanha) .ThenInclude(x => x.UsuarioIdFkNavigation) .Where(x => x.Inativo == false) .Where(x => x.Contatousuariocampanha.Any()).Count(); result.TotalDrogariasNaoContactadas = _ctx.Cliente.Include(x => x.Contatousuariocampanha) .ThenInclude(x => x.UsuarioIdFkNavigation) .Where(x => x.Inativo == false) .Where(x => !x.Contatousuariocampanha.Any()).Count(); var users = _ctx.Usuario.Where(x => x.Inativo == false).ToList(); foreach (var user in users) { var dadosUser = new ResultadosUsuario(); dadosUser.Usuario = user; dadosUser.DrogariasContactadas = _ctx.Contatousuariocampanha.Include(x => x.ClienteIdFkNavigation) .Where(x => x.UsuarioIdFkNavigation.IdPk == user.IdPk) .GroupBy(x => x.ClienteIdFk).Count(); dadosUser.DrogariasContactadasNoDia = _ctx.Contatousuariocampanha.Include(x => x.ClienteIdFkNavigation) .Where(x => x.UsuarioIdFkNavigation.IdPk == user.IdPk) .Where(x => x.DataInclusao >= dataAtual) .GroupBy(x => x.ClienteIdFk).Count(); dadosUser.ContratosFechados = _ctx.Contrato.Include(x => x.PropostaIdFkNavigation) .ThenInclude(x => x.UsuarioIdFkNavigation) .Where(x => x.TipoFechamentoContrato == 3 || x.EntrouNaCampanha == true) .Where(x => x.PropostaIdFkNavigation.UsuarioIdFkNavigation.IdPk == user.IdPk) .Where(x => x.DataInclusao >= inicioCampanha && x.DataInclusao <= finalCampanha).Count(); result.DadosUsuarios.Add(dadosUser); result.TotalContratosFechados = result.TotalContratosFechados + dadosUser.ContratosFechados; } result.DadosUsuarios = result.DadosUsuarios.OrderByDescending(x => x.ContratosFechados).ToList(); return(result); }
public IActionResult Get() { try { DashboardDTO dto = _mapper.Map <DashboardDTO>(new Dashboard(_db)); _logger.LogInformation($"{Environment.NewLine} Get"); return(Ok(dto)); } catch (Exception ex) { _logger.LogError($"{Environment.NewLine} {ex.Message}"); throw; } }
private void FlyoutPanel1_ButtonClick(object sender, FlyoutPanelButtonClickEventArgs e) { try { string caption = e.Button.Caption.ToString(); switch (caption) { case "작업이동": if (FlyoutDialog.Show(this.FindForm(), MyDevExpressFunctions.CreateCloseAction()) == System.Windows.Forms.DialogResult.Yes) { List <DashboardDTO> gridList = this.gridControl2.DataSource as List <DashboardDTO>; IList <DashboardDTO> resultList = new List <DashboardDTO>(); for (int x = 0; x < gridList.Count; x++) { // https://stackoverflow.com/questions/12762617/how-to-get-the-selected-row-values-of-devexpress-xtragrid if (gridList[x].CHK2.ToString() == "True") { DashboardDTO vo = gridList[x]; vo.EQP_ID = gridList[checkedGridView1].EQP_ID; vo.ORDER_COUNT = gridList[checkedGridView1].ORDER_COUNT; resultList.Add(vo); } } this.gridControl3.DataSource = resultList; } ; break; case "적용": //(sender as FlyoutPanel).HidePopup(); //this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; (sender as FlyoutPanel).HidePopup(); this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null; break; case "취소": // . . . (sender as FlyoutPanel).HidePopup(); this.panelComparence.Visible = false; this.flyoutPanel1.OptionsButtonPanel.ShowButtonPanel = false; this.gridControl3.Visible = false; this.gridControl3.DataSource = null; break; } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public async Task <IActionResult> Index() { try { var dto = new DashboardDTO(); dto.Cities = await _storage.GetCitiesAsync(); dto.Data = await _storage.GetDataAsync(); return(View(dto)); } catch (Exception) { return(BadRequest()); } }
public ActionResult <DashboardDTO> Get() { DashboardDTO dashDTO = new DashboardDTO() { Kpis = new List <KPIs>(), Programs = new List <Models.Programs>(), Machines = new List <Models.Machine>() }; MachineRepository repository = new MachineRepository(); dashDTO.Kpis = (List <KPIs>)repository.SelectKPIs(); dashDTO.Machines = (List <Machine>)repository.SelectTop10Machines(); dashDTO.Programs = (List <Programs>)repository.SelectTop10Programs(); return(dashDTO); }
private async void CarregarDados(int participanteId) { await Task.Run(() => { IsLoading = true; var servico = ServiceFactory.DashboardService(); DashboardDTO = servico.ObterDashboard(participanteId); if (dashboardDTO != null && PreencherGrafico != null) { PreencherGrafico(this, new EventArgs()); } IsLoading = false; }); }
public void SearchTopJob(List <TB_CANDIDATE> candidate) { TempData["Top"] = 0; List <DashboardDTO> most = new List <DashboardDTO>(); foreach (TB_CANDIDATE c in candidate) { int Totalpos = candidate.Where(m => m.CANDIDATE_STATE_ID == c.CANDIDATE_STATE_ID).Count(); TB_JOB_POSITION namepos = db.TB_JOB_POSITION.Where(m => m.JOBPOSITION_NAME == c.POSITION).FirstOrDefault(); TB_STATE_CANDIDATE statepos = db.TB_STATE_CANDIDATE.Where(m => m.ID == c.CANDIDATE_STATE_ID).FirstOrDefault(); DashboardDTO mostpos = new DashboardDTO { mostqty = Totalpos, mostposition = namepos.JOBPOSITION_NAME, moststate = statepos.STATE_NAME }; most.Add(mostpos); } TempData["Top"] = most; }
// GET: Dashboard public ActionResult Index() { DashboardDTO dashboardDTO = new DashboardDTO(); string requestURI = ConfigurationManager.AppSettings["ApiUrl"] + "/api/UserAndRole/GetDashboardInfo/" + ConfigurationManager.AppSettings["UserID"].ToString() + ""; using (var client = new HttpClient()) { var responseTask = client.GetAsync(requestURI); var result = responseTask.Result; if (result.IsSuccessStatusCode) { var readTask = result.Content.ReadAsAsync <DashboardDTO>(); readTask.Wait(); dashboardDTO = readTask.Result; } } return(View(dashboardDTO)); }
public async Task <ApiResponse <DashboardDTO> > Get() { var result = new ApiResponse <DashboardDTO>(); var dashboard = new DashboardDTO(); try { dashboard.AllExams = dbContext.Exams.Count().ToString(); dashboard.Questions = dbContext.Questions.Count().ToString(); result.Data = dashboard; result.AddSuccess(); return(await Task.FromResult(result)); } catch (Exception ex) { result.AddError(ex); return(await Task.FromResult(result)); } }
// GET: Home public async Task <IActionResult> Index() { var res = new DashboardDTO(); res.CourseStudentNumber = await(from c in _context.Courses join s in _context.Students on c.ID equals s.CourseID into m from s in m.DefaultIfEmpty() group s by new { c.ID, c.Name } into studentCourse select new CourseStudentNumber { CourseName = studentCourse.Key.Name, TotalStudentRegister = studentCourse.Count() }).Take(3).ToListAsync(); var studentPerYear = await _context.Students .Where(s => s.Deleted != 1 && s.CreatedAt.Value.Year >= DateTime.Now.Year - 9).ToListAsync(); res.StudentPerYear = new List <StudentPerYear>(); for (var i = DateTime.Now.Year - 9; i <= DateTime.Now.Year; i++) { res.StudentPerYear.Add(new StudentPerYear { Year = i, TotalStudent = studentPerYear.Where(s => s.CreatedAt.Value.Year == i).Count(), TotalStudentGraduating = studentPerYear.Where(s => s.UpdatedAt.Value.Year == i && s.Status == 3).Count() }); } res.TotalStudent = await _context.Students.Where(d => d.Deleted != 1).CountAsync(); res.TotalCourse = await _context.Courses.Where(d => d.Deleted != 1).CountAsync(); res.TotalCourseAvaiable = await _context.Courses.Where(d => d.Deleted != 1 && d.Status == 0).CountAsync(); res.TotalFaculty = await _context.Faculties.Where(d => d.Deleted != 1).CountAsync(); res.TotalPost = await _context.Contents.Where(d => d.Deleted != 1 && d.Type == 2).CountAsync(); res.TotalStudentAdmission = await _context.Students.Where(d => d.Deleted != 1 && d.Status == 1).CountAsync(); return(View(res)); }
public DashboardDTO GetDashboardData() { DashboardDTO dashboardDTO = null; CandidatesDTO candidatesDTO = null; TechDashboardDTO techDTO = null; List <AssociatesDashboardDTO> lstAssociatesDTO = null; using (var unitOfWork = new UnitOfWork(new SkillsTrackerContext())) { DataTable dt = null; var ds = unitOfWork.Associates.GetDashboardData(); if (ds.Tables.Count > 0) { dt = ds.Tables[0]; candidatesDTO = Mapper.Map <DataRow, CandidatesDTO>(dt.Rows[0]); } if (ds.Tables.Count > 1) { dt = ds.Tables[1]; techDTO = Mapper.Map <DataRow, TechDashboardDTO>(dt.Rows[0]); } if (ds.Tables.Count > 2) { dt = ds.Tables[2]; var rows = new List <DataRow>(dt.Rows.OfType <DataRow>()); lstAssociatesDTO = Mapper.Map <List <DataRow>, List <AssociatesDashboardDTO> >(rows); } dashboardDTO = new DashboardDTO() { Candidates = candidatesDTO, Technology = techDTO, Associates = lstAssociatesDTO }; return(dashboardDTO); } }
public void LoadDataCharts(string sCapDo, string sGiaTriCapDo, string sCongDoan, string sDateFrom, string sDateTo) { var listTong = new ArrayList(); FilterCondition f = new FilterCondition() { SystemId = CommonHeader.defaultSystemId, SelectedCapDo = sCapDo, SelectedGiaTriCapDo = sGiaTriCapDo, SelectedCongDoan = sCongDoan, DateFrom = DateTime.Parse(sDateFrom), DateTo = DateTime.Parse(sDateTo) }; f.ConvertDate2Sql(); DashboardDTO dashDto = new DashboardDTO(); listTong = dashDto.getDataForCharts(f); }
public async Task <DashboardDTO> GetDashboard() { var dashboard = new DashboardDTO(); string userMainCurrency = "PLN"; var now = DateTime.UtcNow; var previousMonth = now.AddMonths(-1); var recalculateCurrencies = true; List <ExchangeRate> exchangeRates = null; var transactions = await this.transactionService.GetTransactionsAsync(new TransactionsFilter { FromDate = now.AddMonths(-6) }); var accounts = await accountService.GetAccountsWithBalanceAsync(); if (recalculateCurrencies) { exchangeRates = (await this.currencyRepository.GetExchangeRatesAsync()).ToList(); } var thisMonthStartDate = new DateTime(now.Year, now.Month, 1); var thisMonthEndDate = thisMonthStartDate.AddMonths(1); for (int i = 4; i >= 0; i--) { var date = new DateTime(now.Year, now.Month, 1).AddMonths(-i); var firstDayInNextMonth = date.AddMonths(1); dashboard.Incomes.Add(new SummaryDTO { From = date, To = firstDayInNextMonth, Value = this.GetTotalExpsenseOrIncome(date, firstDayInNextMonth, transactions, userMainCurrency, exchangeRates, true) }); dashboard.Expenses.Add(new SummaryDTO { From = date, To = firstDayInNextMonth, Value = this.GetTotalExpsenseOrIncome(date, firstDayInNextMonth, transactions, userMainCurrency, exchangeRates) }); } dashboard.Transactions = transactions.ToList(); dashboard.ThisMonthCategoryChart = this.GetCategoriesShareInThePeriodOfTime(thisMonthStartDate, thisMonthEndDate, transactions, userMainCurrency, exchangeRates); dashboard.LastMonthCategoryChart = this.GetCategoriesShareInThePeriodOfTime(new DateTime(previousMonth.Year, previousMonth.Month, 1), new DateTime(previousMonth.Year, previousMonth.Month, DateTime.DaysInMonth(previousMonth.Year, previousMonth.Month)), transactions, userMainCurrency, exchangeRates); dashboard.ActualStatus = this.CalculateActualStatus(accounts); dashboard.Total = this.CalculateTotalSum(dashboard.ActualStatus, exchangeRates, userMainCurrency); return(dashboard); }
public async Task<ActionResult> GridViewComplainDashboard(string datepicker, string datepicker2, string com_no) { DashboardDTO _DashboardDTO = new DashboardDTO(); List<DashboardGridDTO> _DashboardGridDTO = new List<DashboardGridDTO>(); LabourComplaintDetailDTO _LabourComplaintDetailDTO = new LabourComplaintDetailDTO(); if (_UtilitySession.Session != null) { if (_UtilitySession.Session.Status == true) { try { DateTime _fromdate = DateTime.ParseExact(datepicker.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture); DateTime _todate = DateTime.ParseExact(datepicker2, "dd/MM/yyyy", CultureInfo.InvariantCulture); ViewBag.Name = _UtilitySession.Session.user.name; string User_id = _UtilitySession.Session.user.id; _LabourComplaintDetailDTO.user = _UtilitySession.Session.user; _LabourComplaintDetailDTO._TimesheetComGridPostDTO = await Task.Run(() => _Repository.DashboardComplainForProjectEngineers(_fromdate, _todate, com_no)); _LabourComplaintDetailDTO.PageSize = 5; _LabourComplaintDetailDTO.TotalCount = _LabourComplaintDetailDTO._TimesheetComGridPostDTO.Count; } catch (Exception ex) { throw; } return PartialView("_PartialViewGridComplainDashboard", _LabourComplaintDetailDTO); } else { return RedirectToAction("Detail", "Home"); } } else { return RedirectToAction("Detail", "Home"); } }
public void Init(DashboardDTO _dto) { // 1. 뷰에추가 https://www.devexpress.com/Support/Center/Question/Details/T262503/widgetview-document-how-to-add-a-control // https://www.devexpress.com/Support/Center/Question/Details/T121157/change-widgetview-document-s-control this.widgetView1.QueryControl += new DevExpress.XtraBars.Docking2010.Views.QueryControlEventHandler(this.widgetView1_QueryControl); for (int x = 0; x < 30; x++) { DevExpress.XtraBars.Docking2010.Views.Widget.Document document = new DevExpress.XtraBars.Docking2010.Views.Widget.Document(); document.Caption = "document" + x; document.ControlName = "UserControl" + x; document.Width = 50; document.Height = 50; //if (x % 2 == 1) document.ControlTypeName = "WindowsFormsApp1.UserControl1"; //else document.ControlTypeName = "WindowsFormsApp1.UserControl2"; if (x % 2 == 1) { document.ControlTypeName = "F5074.DevExpressWinforms.MyUserControl.MyUserControl01"; } else { document.ControlTypeName = "F5074.DevExpressWinforms.MyUserControl.MyUserControl01"; } //document.Properties.ShowCloseButton = DevExpress.Utils.DefaultBoolean.False; //document.Properties.ShowMaximizeButton = DevExpress.Utils.DefaultBoolean.False; this.widgetView1.Documents.AddRange(new DevExpress.XtraBars.Docking2010.Views.BaseDocument[] { document }); //this.widgetView1.FlowLayoutProperties.FlowLayoutItems.AddRange(new DevExpress.XtraBars.Docking2010.Views.Widget.Document[] { document }); //this.stackGroup1.Items.AddRange(new DevExpress.XtraBars.Docking2010.Views.Widget.Document[] { document }); // 2번 방법 //var control = Activator.CreateInstance(Type.GetType(document.ControlTypeName)) as Control; //documentManager1.View.AddDocument(control); } //this.widgetView1.QueryMaximizedControl += WidgetView1_QueryMaximizedControl; this.widgetView1.DocumentProperties.ShowCloseButton = false; this.widgetView1.LayoutMode = DevExpress.XtraBars.Docking2010.Views.Widget.LayoutMode.FlowLayout; this.widgetView1.RootContainer.Element = null; this.widgetView1.RootContainer.Orientation = System.Windows.Forms.Orientation.Vertical; }
public async Task<ActionResult> GridViewDashboard(string datepicker, string datepicker2, string JobNo) { DashboardDTO _DashboardDTO = new DashboardDTO(); List<DashboardGridDTO> _DashboardGridDTO = new List<DashboardGridDTO>(); if (_UtilitySession.Session != null) { if (_UtilitySession.Session.Status == true) { ViewBag.Name = _UtilitySession.Session.user.name; try { DateTime _fromdate = DateTime.ParseExact(datepicker.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture); DateTime _todate = DateTime.ParseExact(datepicker2, "dd/MM/yyyy", CultureInfo.InvariantCulture); string _JobNo = JobNo; _DashboardGridDTO = await Task.Run(() => _Repository.DashboardDetailsForProjectEngineers(_fromdate, _todate, _JobNo)); _DashboardDTO._DashboardGridDTO = _DashboardGridDTO; } catch (Exception ex) { throw; } return PartialView("_PartialViewForGridDashboard", _DashboardDTO); } else { return RedirectToAction("Detail", "Home"); } } else { return RedirectToAction("Detail", "Home"); } }
public async Task <DashboardDTO> GetDashboard() { DashboardDTO dto = new DashboardDTO(); dto.VehicleTransmission = await this.UnitOfWork.VehicleTransmissionRepository.GetCount(); dto.VehicleModel = await this.UnitOfWork.VehicleModelRepository.GetCount(); dto.VehicleMaker = await this.UnitOfWork.VehicleMakerRepository.GetCount(); dto.VehicleFeature = await this.UnitOfWork.VehicleFeatureRepository.GetCount(); dto.VehicleBodyType = await this.UnitOfWork.VehicleBodyTypeRepository.GetCount(); dto.VehicleAssembly = await this.UnitOfWork.VehicleAssemblyRepository.GetCount(); dto.TravelUnit = await this.UnitOfWork.TravelUnitRepository.GetCount(); dto.RideStatus = await this.UnitOfWork.RideStatusRepository.GetCount(); dto.DriverStatus = await this.UnitOfWork.DriverStatusRepository.GetCount(); dto.DistanceUnit = await this.UnitOfWork.DistanceUnitRepository.GetCount(); dto.Currency = await this.UnitOfWork.CurrencyRepository.GetCount(); dto.ColorCount = await this.UnitOfWork.ColorRepository.GetCount(); dto.Country = await this.UnitOfWork.CountryRepository.GetCount(); dto.State = await this.UnitOfWork.StateRepository.GetCount(); dto.City = await this.UnitOfWork.CityRepository.GetCount(); return(dto); }