Example #1
0
        public override void FormLoad()
        {
            try
            {
                ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();
                AddCustomSearchCriterias(searchCriteria);

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

                this.gvPerson.DataSource = AdminClientRef.GetAllPersons(searchCriteria, GridViewSortExpression, GridViewSortDirection);
                if (NewPageIndex.HasValue)
                {
                    this.gvPerson.PageIndex = NewPageIndex.Value;
                }
                this.gvPerson.DataBind();
            }
            catch (Exception ex)
            {
                BaseHelper.Log("Грешка в FormLoad " + formResource.PagePath);
                BaseHelper.Log(ex.Message);
                BaseHelper.Log(ex.StackTrace);
            }
        }
Example #2
0
 public void LoadPersonsList()
 {
     try
     {
         ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();
         AddCustomSearchCriterias(searchCriteria);
         List <PersonDataView> list = AdminClientRef.GetAllPersons(searchCriteria, GridViewSortExpression, GridViewSortDirection);
         LoadSearchResult(list);
     }
     catch (Exception ex)
     {
         BaseHelper.Log("Грешка в LoadPersonsList " + formResource.PagePath);
         BaseHelper.Log(ex.Message);
         BaseHelper.Log(ex.StackTrace);
     }
 }
Example #3
0
        protected void btnSearch_Click(object sender, EventArgs e)
        {
            try
            {
                ICollection <AbstractSearch> searchCriteria = new List <AbstractSearch>();
                AddCustomSearchCriterias(searchCriteria);
                List <PersonDataView> list = AdminClientRef.GetAllPersons(searchCriteria, GridViewSortExpression, GridViewSortDirection);


                LoadSearchResult(list);
                this.pnlFilterData.Visible = false;
            }
            catch (Exception ex)
            {
                BaseHelper.Log("Грешка в btnSearch_Click " + formResource.PagePath);
                BaseHelper.Log(ex.Message);
                BaseHelper.Log(ex.StackTrace);
            }
        }
Example #4
0
        public override void AlphabetClick(string alpha)
        {
            try
            {
                if (alpha == Constants.ALL_CHARACTERS)
                {
                    List <AbstractSearch> searchCriteria = new List <AbstractSearch>();

                    List <PersonDataView> list = AdminClientRef.GetAllPersons(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 <PersonDataView> list = AdminClientRef.GetAllPersons(searchCriteria, GridViewSortExpression, GridViewSortDirection);


                    LoadSearchResult(list);
                }
            }
            catch (Exception ex)
            {
                BaseHelper.Log("Грешка в AlphabetClick " + formResource.PagePath);
                BaseHelper.Log(ex.Message);
                BaseHelper.Log(ex.StackTrace);
            }
        }