Exemple #1
0
 private IndexControl(IndexControlElement indexControlElement,
                      Visibility detailsBtnVisibility = Visibility.Hidden, Visibility crudBtnVisibility = Visibility.Visible)
 {
     InitializeComponent();
     IndexControlElement       = indexControlElement;
     this.detailsBtnVisibility = detailsBtnVisibility;
     this.crudBtnVisibility    = crudBtnVisibility;
 }
Exemple #2
0
        public static async Task <IndexControl> CreateIndexControl(IndexControlElement indexControlElement, DataGridControlElement dataGridControlElement,
                                                                   Visibility detailsBtnVisibility = Visibility.Hidden, Visibility crudBtnVisibility = Visibility.Visible)
        {
            IndexControl indexControl = new IndexControl(indexControlElement, detailsBtnVisibility, crudBtnVisibility)
            {
                DataGridControl = await DataGridControl.CreateDataGridControl(dataGridControlElement)
            };

            indexControl.DataContext = indexControl.DataGridControl.DataGrid;
            indexControl.IndexControlElement.DataGridControl = indexControl.DataGridControl;
            indexControl.InitializeComponents();
            return(indexControl);
        }
Exemple #3
0
 private void CreateButton_Click(object sender, RoutedEventArgs e)
 {
     IndexControlElement.Create();
     DataGridControl.Refresh();
 }
Exemple #4
0
 private void DetailsButton_Click(object sender, RoutedEventArgs e)
 {
     IndexControlElement.Details(DataGridControl.DataGrid.SelectedItem);
     DataGridControl.Refresh();
 }