Beispiel #1
0
 private void Close_ButtonClearFiltersClick()
 {
     needrefresh  = false;
     From         = DefaultMin;
     To           = DefaultMax;
     FilterStatus = false;
     ButtonApplyClick?.Invoke();
     needrefresh = true;
 }
Beispiel #2
0
 private void CheckAll_Click(object sender, RoutedEventArgs e)
 {
     ElementDataGrid.SelectedItem = null;
     NeedRefresh = false;
     foreach (DataRow row in DataTableData.Rows)
     {
         row["IsChecked"] = (Boolean)(sender as CheckBox).IsChecked;
     }
     NeedRefresh      = true;
     FilterStatusAll  = (Boolean)(sender as CheckBox).IsChecked;
     FilterStatusNone = !(Boolean)(sender as CheckBox).IsChecked;
     ButtonApplyClick?.Invoke();
 }
Beispiel #3
0
 private void ButtonApplyClickWindowTime()
 {
     if (needrefresh)
     {
         FromTime = (String)flexGridFromToWindowTime.From;
         ToTime   = (String)flexGridFromToWindowTime.To;
         //if (flexGridFromToWindowTime.FilterStatus)
         //    ImageSource = ImageHelper.GenerateImage("IconClearFilter.png");
         //else
         //    ImageSource = ImageHelper.GenerateImage("IconFilter.png");
         this.FilterStatus = flexGridFromToWindowTime.FilterStatus;
         ButtonApplyClick?.Invoke();
     }
 }
Beispiel #4
0
        private void ElementDataGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
        {
            DataRowView currentRowView = this.ElementDataGrid.SelectedItem as DataRowView;
            DataRow     currentRow     = null;

            if (currentRowView != null)
            {
                currentRow = currentRowView.Row as DataRow;
                //currentRow["IsChecked"] = !convertdata.FlexDataConvertToBoolean(currentRow["IsChecked"].ToString());
            }

            if (NeedRefresh)
            {
                Boolean IsCheckedOne = false;
                Boolean IsCheckedAll = true;
                foreach (DataRow rowtable in DataTableData.Rows)
                {
                    if (rowtable["IsChecked"].ToString().ToLower() == "true")
                    {
                        IsCheckedOne = true;
                    }
                    if (rowtable["IsChecked"].ToString().ToLower() == "false")
                    {
                        IsCheckedAll = false;
                    }
                }

                if (IsCheckedOne == false)
                {
                    CheckAll = false;
                }

                if (IsCheckedAll == true)
                {
                    CheckAll = true;
                }

                if (IsCheckedOne == false)
                {
                    FilterStatusNone = true;
                    FilterStatusAll  = false;
                }
                else
                {
                    FilterStatusAll  = IsCheckedAll;
                    FilterStatusNone = false;
                }
                ButtonApplyClick?.Invoke();
            }
        }
 private void Date_TextChanged()
 {
     if (needrefresh)
     {
         if (To != DefaultMax || From != DefaultMin)
         {
             FilterStatus = true;
         }
         else
         {
             FilterStatus = false;
         }
         ButtonApplyClick?.Invoke();
     }
 }
Beispiel #6
0
        private void CheckBox_Click(object sender, RoutedEventArgs e)
        {
            if (NeedRefresh)
            {
                Boolean IsCheckedOne = false;
                Boolean IsCheckedAll = true;
                foreach (DataRow rowtable in DataTableData.Rows)
                {
                    if (rowtable["IsChecked"].ToString().ToLower() == "true")
                    {
                        IsCheckedOne = true;
                    }
                    if (rowtable["IsChecked"].ToString().ToLower() == "false")
                    {
                        IsCheckedAll = false;
                    }
                }

                if (IsCheckedOne == false)
                {
                    CheckAll = false;
                }

                if (IsCheckedAll == true)
                {
                    CheckAll = true;
                }

                if (IsCheckedOne == false)
                {
                    FilterStatusNone = true;
                    FilterStatusAll  = false;
                }
                else
                {
                    FilterStatusAll  = IsCheckedAll;
                    FilterStatusNone = false;
                }
                ButtonApplyClick?.Invoke();
            }
        }