Beispiel #1
0
        public override void AlphabetClick(string alpha)
        {
            if (alpha == Constants.ALL_CHARACTERS)
            {
                List <AbstractSearch> searchCriteria = new List <AbstractSearch>();

                List <AttachmentDataView> list = CommonClientRef.GetAccountingAttachmentList(searchCriteria, GridViewSortExpression, GridViewSortDirection);

                ClearFilterForm();
                LoadSearchResult(list);
            }
            else
            {
                ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();
                AddCustomSearchCriterias(searchCriteria);
                searchCriteria.Add(new TextSearch
                {
                    Comparator = TextComparators.StartsWith,
                    Property   = "FirstName",
                    SearchTerm = alpha
                });

                List <AttachmentDataView> list = CommonClientRef.GetAccountingAttachmentList(searchCriteria, GridViewSortExpression, GridViewSortDirection);

                LoadSearchResult(list);
            }
        }
Beispiel #2
0
        public void LoadAttachmentList()
        {
            ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();

            AddCustomSearchCriterias(searchCriteria);
            List <AttachmentDataView> list = CommonClientRef.GetAccountingAttachmentList(searchCriteria, GridViewSortExpression, GridViewSortDirection);

            LoadSearchResult(list);
        }
Beispiel #3
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();

            AddCustomSearchCriterias(searchCriteria);
            List <AttachmentDataView> list = CommonClientRef.GetAccountingAttachmentList(searchCriteria, GridViewSortExpression, GridViewSortDirection);

            LoadSearchResult(list);
            this.pnlFilterData.Visible = false;
        }
Beispiel #4
0
        public override void FormLoad()
        {
            base.FormLoad();

            if (!this.FormContext.QueryString.Contains("ModuleSysName"))
            {
                this.ShowMSG("Подадени са грешни параметри на страницата");
                return;
            }
            if (!this.FormContext.QueryString.Contains("AttachmentDocumentType"))
            {
                this.ShowMSG("Подадени са грешни параметри на страницата");
                return;
            }

            string ModuleSysName          = this.FormContext.QueryString["ModuleSysName"].ToString();
            string AttachmentDocumentType = this.FormContext.QueryString["AttachmentDocumentType"].ToString();

            if (ModuleSysName == Constants.MODULE_FINANCE &&
                AttachmentDocumentType == ETEMEnums.FinanceReportTypeEnum.FinanceReport.ToString())
            {
                CheckUserActionPermission(ETEMEnums.SecuritySettings.AttachmentShowList, true);
            }

            string DocKeyTypeIntCode = string.Empty;

            if (this.FormContext.QueryString.Contains("DocKeyTypeIntCode"))
            {
                DocKeyTypeIntCode = this.FormContext.QueryString["DocKeyTypeIntCode"].ToString();
            }

            if (DocKeyTypeIntCode == string.Empty)
            {
                DocKeyTypeIntCode = "AttachmentType";
                this.ddlAttachmentType.KeyTypeIntCode = DocKeyTypeIntCode;
            }
            else
            {
                this.ddlAttachmentType.KeyTypeIntCode = DocKeyTypeIntCode;
            }
            this.ddlAttachmentType.UserControlLoad();

            this.Attachment.ModuleSysName          = ModuleSysName;
            this.Attachment.AttachmentDocumentType = AttachmentDocumentType;
            this.Attachment.DocKeyTypeIntCode      = DocKeyTypeIntCode;

            if (!IsPostBack)
            {
                KeyType ktAttachmentType = this.AdminClientRef.GetKeyTypeByIntCode(DocKeyTypeIntCode);

                if (ktAttachmentType != null)
                {
                    this.AttachmentTypeKeyTypeID = ktAttachmentType.idKeyType;
                }
            }

            ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();

            AddCustomSearchCriterias(searchCriteria);

            if (string.IsNullOrEmpty(this.GridViewSortExpression) || this.GridViewSortExpression == Constants.INVALID_ID_STRING)
            {
                this.GridViewSortExpression = "AttachmentDate";
            }

            this.gvAttachment.DataSource = CommonClientRef.GetAccountingAttachmentList(searchCriteria, GridViewSortExpression, GridViewSortDirection);
            if (NewPageIndex.HasValue)
            {
                this.gvAttachment.PageIndex = NewPageIndex.Value;
            }
            this.gvAttachment.DataBind();
        }