Example #1
0
        private void InitControl()
        {
            SearchFilesRequest request = new SearchFilesRequest(SearchFileType.TicketAndFeedback, true, hidOrderBy.Value, hidOrderDirection.Value);

            request.IsPublic    = UserInfo.Role == RolesEnum.CLIENT;
            request.CurrentPage = anpFiles.CurrentPageIndex;
            request.PageCount   = anpFiles.PageSize;
            Regex regticketcode = new Regex("^[BbRr]");

            request.Keyword     = regticketcode.Replace(txtKeyword.Text, "").NoHTML();
            request.CompanyID   = int.Parse(ddlCompany.SelectedValue);
            request.ProjectID   = int.Parse(ddlProject.SelectedValue);
            request.UserID      = UserInfo.ID;
            request.KeywordType = SearchKeywordType.All;
            FileApplication      fileApp = new FileApplication();
            List <FileDetailDto> list    = fileApp.GetFiles(request);

            if (list == null || list.Count == 0)
            {
                rptTickets.Visible  = false;
                trNoTickets.Visible = true;
            }
            else
            {
                rptTickets.DataSource = list;
                rptTickets.DataBind();
                rptTickets.Visible   = true;
                trNoTickets.Visible  = false;
                anpFiles.RecordCount = request.RecordCount;
            }
        }
Example #2
0
        private void InitControl()
        {
            SearchFilesRequest request = new SearchFilesRequest(SearchFileType.Project, true, "FileTitle", "ASC");

            request.IsPublic    = UserInfo.Role == RolesEnum.CLIENT;
            request.CurrentPage = anpFiles.CurrentPageIndex;
            request.PageCount   = anpFiles.PageSize;
            request.Keyword     = txtKeyword.Text.NoHTML();
            request.CompanyID   = int.Parse(ddlCompany.SelectedValue);
            request.ProjectID   = int.Parse(ddlProject.SelectedValue);
            FileApplication      fileApp = new FileApplication();
            List <FileDetailDto> list    = fileApp.GetFiles(request);

            if (list == null || list.Count == 0)
            {
                rptTickets.Visible  = false;
                trNoTickets.Visible = true;
            }
            else
            {
                rptTickets.DataSource = list;
                rptTickets.DataBind();
                trNoTickets.Visible  = false;
                anpFiles.RecordCount = request.RecordCount;
            }
        }
Example #3
0
        private void InitControl()
        {
            SearchFilesRequest request = new SearchFilesRequest(SearchFileType.WorkRequest, true, hidOrderBy.Value, hidOrderDirection.Value);

            request.CurrentPage = anpWorkRequestFiles.CurrentPageIndex;
            request.PageCount   = anpWorkRequestFiles.PageSize;
            request.Keyword     = txtTag.Text.Trim().NoHTML();
            if (UserInfo.Role == RolesEnum.CLIENT)
            {
                request.UserID = UserInfo.UserID;
            }
            List <FileDetailDto> list = fileApp.GetFiles(request);

            rpt.DataSource = list;
            rpt.DataBind();
            anpWorkRequestFiles.RecordCount = request.RecordCount;
        }
Example #4
0
        private void InitFiles()
        {
            int                id      = QS("id", 0);
            FileApplication    fileApp = new FileApplication();
            SearchFilesRequest request = new SearchFilesRequest(SearchFileType.Project, false, "FileTitle", "ASC");

            request.ProjectID = id;
            List <FileDetailDto> list = fileApp.GetFiles(request);

            if (list == null || list.Count == 0)
            {
                trNoProject.Visible = true;
            }
            else
            {
                trNoProject.Visible = false;
                rptFiles.DataSource = list;
                rptFiles.DataBind();
            }
        }
Example #5
0
        private void InitFiles()
        {
            FileApplication    fileApp = new FileApplication();
            SearchFilesRequest request = new SearchFilesRequest(SearchFileType.Company, false, "FileTitle", "ASC");

            request.CompanyID = CompanyID;
            request.IsPublic  = BaseWebsitePage.UserInfo.Role == RolesEnum.CLIENT;
            List <FileDetailDto> list = fileApp.GetFiles(request);

            if (list == null || list.Count == 0)
            {
                trNoFiles.Visible = true;
            }
            else
            {
                trNoFiles.Visible   = false;
                rptFiles.DataSource = list;
                rptFiles.DataBind();
            }
        }