コード例 #1
0
        void ShowDetails(object a)
        {
            Client_table_ViewModel client_Table_ViewModel = new Client_table_ViewModel();
            Client_table           client_Table           = new Client_table();

            client_Table_ViewModel.Person1 = SelectedPerson;
            client_Table.DataContext       = client_Table_ViewModel;
            client_Table.ShowDialog();
        }
コード例 #2
0
        void OpenClientTable(object a)
        {
            var param = a as string;

            MainViewModel.parametr = param;
            Client_table           client_Table           = new Client_table();
            Client_table_ViewModel client_Table_ViewModel = new Client_table_ViewModel();

            client_Table_ViewModel.ClientCodeEditable = true;
            client_Table.DataContext = client_Table_ViewModel;
            client_Table.ShowDialog();
        }
コード例 #3
0
        void Select(object a)
        {
            var param = a as string;

            MainViewModel.parametr = param;

            Client_table           client_Table           = new Client_table();
            Client_table_ViewModel client_Table_ViewModel = new Client_table_ViewModel();

            client_Table_ViewModel.Person1.Copy(SelectedPerson);
            client_Table.DataContext = client_Table_ViewModel;
            client_Table.ShowDialog();
        }
コード例 #4
0
        void OpenTable(object a)
        {
            switch (Selectitm.GetType().Name)
            {
            case "Person":
                MainViewModel.parametr1 = "Zaminlik";
                Client_table           client_Table           = new Client_table();
                Client_table_ViewModel client_Table_ViewModel = new Client_table_ViewModel();
                client_Table_ViewModel.Person1.Copy(Selectitm as Person);
                client_Table.DataContext = client_Table_ViewModel;
                client_Table.ShowDialog();
                break;

            case "Thing":
                ColateralTableViewModel colateralTableViewModel = new ColateralTableViewModel();
                CollateralTableView     collateralTableView     = new CollateralTableView();
                ColateralTableViewModel.Thing.Copy(Selectitm as Thing);
                collateralTableView.DataContext = colateralTableViewModel;
                collateralTableView.ShowDialog();
                break;

            case "Car":
                CarPledgeTableViewModel carPledgeTableViewModel = new CarPledgeTableViewModel();
                CarPledgeTableView      carPledgeTableView      = new CarPledgeTableView();
                CarPledgeTableViewModel.Car.Copy(Selectitm as Car);
                carPledgeTableView.DataContext = carPledgeTableViewModel;
                carPledgeTableView.ShowDialog();
                break;

            case "House":
                HousePledgeViewModel housePledgeViewModel = new HousePledgeViewModel();
                HousePledgeView      housePledgeView      = new HousePledgeView();
                HousePledgeViewModel.House.Copy(Selectitm as House);
                housePledgeView.DataContext = housePledgeViewModel;
                housePledgeView.ShowDialog();
                break;

            case "Jewelries":
                JewelryTableViewModel jewelryTableViewModel = new JewelryTableViewModel();
                JewelryTableView      jewelryTableView      = new JewelryTableView();
                JewelryTableViewModel.Jewelries.Copy(Selectitm as Jewelries);
                jewelryTableView.DataContext = jewelryTableViewModel;
                jewelryTableView.ShowDialog();
                break;

            case "Deposit": MessageBox.Show("Hello Deposit"); break;
            }

            //  MessageBox.Show(Selectitm.GetType().ToString());
        }
コード例 #5
0
        public void OpenClientTable(object a)
        {
            MainViewModel.parametr1 = "FromNağdTablo";
            var                    param                  = a as string;
            Client_table           client_Table           = new Client_table();
            Client_table_ViewModel client_Table_ViewModel = new Client_table_ViewModel();

            try
            {
                if (param == "Ətraflı")
                {
                    client_Table_ViewModel.Person1.Copy(Person);
                    client_Table_ViewModel.ClientCodeEditable = false;
                }
                else
                {
                    client_Table_ViewModel.ClientCodeEditable = true;
                }
                client_Table.DataContext = client_Table_ViewModel;
                client_Table.ShowDialog();
            }
            catch (Exception) { MessageBox.Show("Müştərini seçməmisiniz!"); }
        }