Ejemplo n.º 1
0
        private async void DealsSortBy_click(DealsSortByModel data)
        {
            try
            {
                var IsAnyUserNameSelected = DealsSortByItems.Where(x => x.Radiobtnimg == Constants.RadiobtnSelectImg).ToList();
                if (IsAnyUserNameSelected.Count > 0 && IsAnyUserNameSelected != null)
                {
                    foreach (var item in IsAnyUserNameSelected)
                    {
                        item.Radiobtnimg         = Constants.RadiobtnUnselectImg;
                        item.NamelblStyle        = (Style)App.Current.Resources["LatoRegularGrayLableStyle"];
                        item.SortByAscDescbtnimg = "";
                    }
                }

                if (data != null)
                {
                    if (data.Radiobtnimg == Constants.RadiobtnUnselectImg)
                    {
                        data.Radiobtnimg = Constants.RadiobtnSelectImg;
                        if (data.name == Constants.BorrowerlblText)
                        {
                            data.SortByAscDescbtnimg = Constants.NameAcendingImg;
                        }
                        else if (data.name == Constants.LastPostDatelblText)
                        {
                            data.SortByAscDescbtnimg = Constants.NumberAcendingImg;
                        }
                        data.NamelblStyle = (Style)App.Current.Resources["LatoBoldDarkBlueLableStyle"];
                    }
                    else
                    {
                        data.Radiobtnimg = Constants.RadiobtnUnselectImg;
                        if (data.name == Constants.BorrowerlblText)
                        {
                            data.SortByAscDescbtnimg = "";
                        }
                        else if (data.name == Constants.LastPostDatelblText)
                        {
                            data.SortByAscDescbtnimg = "";
                        }
                        data.NamelblStyle = (Style)App.Current.Resources["LatoRegularGrayLableStyle"];
                    }
                    if (isFilterPopup)
                    {
                        App.SelectedTitle = data.name;
                    }
                    if (isSortingPopup)
                    {
                        selectedName = data.name;
                    }
                }
            }
            catch (Exception ex)
            {
                await ClosePopup();

                Debug.WriteLine(ex.Message);
            }
        }
 private void GetApprovalSortByData()
 {
     DealsSortByItems.Clear();
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.BorrowerlblText, Radiobtnimg = (App.ApprovalSelectedTitle == Constants.BorrowerlblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg, SortByAscDescbtnimg = (App.AsceDsceNameApproval == true) ? Constants.NameDescendingImg : Constants.NameAcendingImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.ApprovalDatelblText, Radiobtnimg = (App.ApprovalSelectedTitle == Constants.ApprovalDatelblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg, SortByAscDescbtnimg = (App.AsceDsceApproval == true) ? Constants.NumberDescendingImg : Constants.NumberAcendingImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.ClearlblText
     });
 }
Ejemplo n.º 3
0
 private void GetApprovalSortByData()
 {
     DealsSortByItems.Clear();
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.BorrowerlblText, Radiobtnimg = (App.ApprovalSelectedTitle == Constants.BorrowerlblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.ApprovalDatelblText, Radiobtnimg = (App.ApprovalSelectedTitle == Constants.ApprovalDatelblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.ClearlblText, Radiobtnimg = (App.ApprovalSelectedTitle == Constants.ClearlblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
 }
Ejemplo n.º 4
0
 public void GetDealsSortByData()
 {
     DealsSortByItems.Clear();
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.BorrowerlblText, Radiobtnimg = (selectedName == Constants.BorrowerlblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.AmountlblText, Radiobtnimg = (selectedName == Constants.AmountlblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.DueDatelblText, Radiobtnimg = (selectedName == Constants.DueDatelblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
     DealsSortByItems.Add(new DealsSortByModel {
         name = Constants.ClosingDatelblText, Radiobtnimg = (selectedName == Constants.ClosingDatelblText) ? Constants.RadiobtnSelectImg : Constants.RadiobtnUnselectImg
     });
 }
        private async void DealsSortBy_click(DealsSortByModel data)
        {
            try
            {
                var IsAnyUserNameSelected = DealsSortByItems.Where(x => x.Radiobtnimg == Constants.RadiobtnSelectImg).ToList();
                if (IsAnyUserNameSelected.Count > 0 && IsAnyUserNameSelected != null)
                {
                    foreach (var item in IsAnyUserNameSelected)
                    {
                        item.Radiobtnimg  = Constants.RadiobtnUnselectImg;
                        item.NamelblStyle = (Style)App.Current.Resources["LatoRegularGrayLableStyle"];
                    }
                }

                if (data != null)
                {
                    if (data.Radiobtnimg == Constants.RadiobtnUnselectImg)
                    {
                        data.Radiobtnimg  = Constants.RadiobtnSelectImg;
                        data.NamelblStyle = (Style)App.Current.Resources["LatoBoldDarkBlueLableStyle"];
                    }
                    else
                    {
                        data.Radiobtnimg  = Constants.RadiobtnUnselectImg;
                        data.NamelblStyle = (Style)App.Current.Resources["LatoRegularGrayLableStyle"];
                    }
                    App.ApprovalSelectedTitle = data.name;
                }
            }
            catch (Exception ex)
            {
                await ClosePopup();

                Debug.WriteLine(ex.Message);
            }
        }
        public async void SortCommandExecute()
        {
            try
            {
                IsLoadingInfiniteEnabled = true;
                if (DealsSortByItems != null && DealsSortByItems.Count > 0)
                {
                    bool IsOptionSelect = DealsSortByItems.Any(x => x.Radiobtnimg == Constants.RadiobtnSelectImg);

                    if (!IsOptionSelect)
                    {
                        await App.Current.MainPage.DisplayAlert("Alert", "Please select an option", "OK");
                    }
                    else
                    {
                        foreach (var item in DealsSortByItems)
                        {
                            isSortApplied = true;
                            if (item.name == Constants.BorrowerlblText)
                            {
                                if (item.Radiobtnimg == Constants.RadiobtnSelectImg)
                                {
                                    if (item.SortByAscDescbtnimg == Constants.NameAcendingImg)
                                    {
                                        SortBorrowerUpCommandExecute();
                                    }
                                    else
                                    {
                                        SortBorrowerDownCommandExecute();
                                    }
                                }
                            }
                            else if (item.name == Constants.AmountlblText)
                            {
                                if (item.Radiobtnimg == Constants.RadiobtnSelectImg)
                                {
                                    if (item.SortByAscDescbtnimg == Constants.NumberDescendingImg)
                                    {
                                        SortAmtUpCommandExecute();
                                    }
                                    else
                                    {
                                        SortAmtDownCommandExecute();
                                    }
                                }
                            }
                            else if (item.name == Constants.DueDatelblText)
                            {
                                if (item.Radiobtnimg == Constants.RadiobtnSelectImg)
                                {
                                    if (item.SortByAscDescbtnimg == Constants.NumberDescendingImg)
                                    {
                                        SortDueDateUpCommandExecute();
                                    }
                                    else
                                    {
                                        SortDueDateDownCommandExecute();
                                    }
                                }
                            }
                            else if (item.name == Constants.ClosingDatelblText)
                            {
                                if (item.Radiobtnimg == Constants.RadiobtnSelectImg)
                                {
                                    if (item.SortByAscDescbtnimg == Constants.NumberDescendingImg)
                                    {
                                        SortClosingUpCommandExecute();
                                    }
                                    else
                                    {
                                        SortClosingDownCommandExecute();
                                    }
                                }
                            }
                            else if (item.name == Constants.ClearlblText)
                            {
                                if (item.Radiobtnimg == Constants.RadiobtnSelectImg)
                                {
                                    SortClearCommandExecute();
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                await ClosePopup();

                Debug.WriteLine(ex.Message);
            }
        }