Пример #1
0
        private void SetCustomer()
        {
            var project = ProjectDataProvider.GetProject(Graph, generationKey.ProjectId);

            lienWaiver.CustomerID   = project.CustomerID;
            lienWaiver.CustomerName =
                BusinessAccountDataProvider.GetBusinessAccount(Graph, project.CustomerID)?.AcctName;
        }
        public WelcomeScreenViewModel()
        {
            AllSheetCollections       = new ObservableCollection <Project>();
            _sheetDataProviderService = new ProjectDataProvider();
            var sheets = _sheetDataProviderService.GetAllSheets();

            sheets.ToList().ForEach(x => AllSheetCollections.Add(x));
            DoubleClickCommand = new RelayCommand <Project>(DoubleClick);
            DeleteCommand      = new RelayCommand <Project>(Delete);

            //the last Entry :)
            AllSheetCollections.Add(new Project()
            {
                DisplayText = Properties.Resources.New_Project
            });
        }
Пример #3
0
        private void LoadData(int index)
        {
            var content = Request.QueryString["content"];
            content = HttpUtility.UrlDecode(content, Encoding.UTF8);
            var param = string.IsNullOrWhiteSpace(content) ? "*:*" : content;//站点地址不输入参数特殊处理为全查询

            var totalCount = new ProjectDataProvider().GetCount(param);
            if (totalCount > 0)
            {
                lvResultPager.RecordCount = (int)totalCount;
                lblCount.Text = totalCount.ToString(CultureInfo.InvariantCulture);
                dtListProjects.DataSource = new ProjectDataProvider().GetList(param, index, PageSize);
                dtListProjects.DataBind();
                lvResultPager.PageSize = PageSize;
                lvResultPager.CurrentPageIndex = index;

                var intpage = this.lvResultPager.PageCount - this.lvResultPager.PageCount % PageSize;
                lvResultPager.NextPageText = lvResultPager.CurrentPageIndex == this.lvResultPager.PageCount ? "尾页" : "下一页";
                lvResultPager.PrevPageText = lvResultPager.CurrentPageIndex == 1 ? "首页" : "上一页";

                return;
            }

            dtListProjects.DataSource = null;
            dtListProjects.DataBind();
        }