Пример #1
0
        //private Type value;
        //private Type targetType;
        //private CultureInfo parameter;
        //private  System.Globalization. culture; culture;

        public AddMotherWindow(Mother con = null)
        {
            InitializeComponent();
            if (con == null)
            {
                mother = new Mother();
            }
            else
            {
                this.Title = "Update mother";
                mother     = con;
                UpdateFlag = true;
                AddMotherbutton.Content         = "Update mother details";
                motherIdTextBox.IsReadOnly      = true;
                motherAddressTextBox.Text       = mother.MotherAddress;
                motherAroundAddressTextBox.Text = mother.MotherAroundAddress;

                this.UserControOfTheWeek.daysOfWork1  = mother.MotherDaysOfWork.DeepClone();
                this.UserControOfTheWeek.tableOfWork1 = mother.MotherTableOfWork.DeepClone();
                this.UserControOfTheWeek.Refreash(this.UserControOfTheWeek, new RoutedEventArgs());
            }
            this.grid0.DataContext = mother;
            bl = FactoryIBL.getIBL();
            //int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            //this.shyComboBox.ItemsSource = a;
            //this.calmComboBox.ItemsSource = a;
            //this.friendlyComboBox.ItemsSource = a;
            errorMessages = new List <string>();
        }
Пример #2
0
        public RemoveMotherWindow()
        {
            InitializeComponent();
            contract = new Mother();
            // MotherTarget = null;
            grid1.DataContext               = contract;
            this.comboBox.DataContext       = contract;
            this.MotherDataGrid.DataContext = contract;
            bl = FactoryIBL.getIBL();

            this.comboBox.ItemsSource       = bl.GetMotherIEnumerable();
            this.comboBox.DisplayMemberPath = "MotherId";
            this.comboBox.SelectedValuePath = "MotherId";
        }
Пример #3
0
        public RemoveChildWindow()
        {
            InitializeComponent();
            child = new Child();
            // childTarget = null;
            this.comboBox.DataContext      = child;
            this.ChildDataGrid.DataContext = child;
            bl = FactoryIBL.getIBL();

            this.comboBox.ItemsSource       = bl.GetChildIEnumerable();
            this.comboBox.DisplayMemberPath = "ChildId";
            this.comboBox.SelectedValuePath = "ChildId";
            InitializeComponent();
        }
Пример #4
0
        public RemoveNannyWindow()
        {
            InitializeComponent();
            contract = new Nanny();
            // NannyTarget = null;
            grid1.DataContext              = contract;
            this.comboBox.DataContext      = contract;
            this.NannyDataGrid.DataContext = contract;
            bl = FactoryIBL.getIBL();

            this.comboBox.ItemsSource       = bl.GetNannyIEnumerable();
            this.comboBox.DisplayMemberPath = "NannyId";
            this.comboBox.SelectedValuePath = "NannyId";
        }
Пример #5
0
        public UpdateContractWindow()
        {
            InitializeComponent();
            contract = new Contract();
            // contractTarget = null;
            grid1.DataContext                 = contract;
            this.comboBox.DataContext         = contract;
            this.ContractDataGrid.DataContext = contract;
            bl = FactoryIBL.getIBL();

            this.comboBox.ItemsSource       = bl.GetContractIEnumerable();
            this.comboBox.DisplayMemberPath = "ContractId";
            this.comboBox.SelectedValuePath = "ContractId";
        }
        // =new BL.FactoryIBL();
        //  BL.FactoryIBL();
        public FitDistanceNannysWindow()
        {
            InitializeComponent();
            contract = new Mother();
            // MotherTarget = null;
            grid1.DataContext               = contract;
            this.comboBox.DataContext       = contract;
            this.MotherDataGrid.DataContext = contract;
            bl = FactoryIBL.getIBL();

            this.comboBox.ItemsSource       = bl.GetMotherIEnumerable();
            this.comboBox.DisplayMemberPath = "MotherId";
            this.comboBox.SelectedValuePath = "MotherId";
            //int i = GoogleMapWpfApp.algo.GoogleApiFunc.CalcDistance("ירושלים,רמת אשכול,14", "ירושלים,רמת אשכול,18", TravelType.Walking);
        }
Пример #7
0
        //private Type value;
        //private Type targetType;
        //private CultureInfo parameter;
        //private  System.Globalization. culture; culture;

        public AddNannyWindow(Nanny con = null)
        {
            InitializeComponent();
            if (con == null)
            {
                nanny = new Nanny();
            }

            else
            {
                this.Title             = "Update nanny";
                nanny                  = con;
                UpdateFlag             = true;
                AddNannybutton.Content = "Update nanny details";
                //nannyIdTextBox.IsReadOnly = true;
                nannyAddressTextBox.Text = nanny.NannyAddress;
                //this.UserControOfTheWeek.daysOfWork1[0] = true;

                this.UserControOfTheWeek.daysOfWork1  = nanny.NannyDaysOfWork.DeepClone();
                this.UserControOfTheWeek.tableOfWork1 = nanny.NannyTableOfWork.DeepClone();
                this.UserControOfTheWeek.Refreash(this.UserControOfTheWeek, new RoutedEventArgs());
            }
            this.grid0.DataContext = nanny;
            bl = FactoryIBL.getIBL();
            int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };

            this.nannyFloorTextBox.ItemsSource           = a;
            this.nannyMaxKidslimitTextBox.ItemsSource    = a;
            this.nannyYearsExperienceTextBox.ItemsSource = a;
            this.niceTextBox.ItemsSource = a;

            // this.UserControOfTheWeek.DaysOfWork1[0] = true;


            errorMessages = new List <string>();
            // nanny.NannyDaysOfWork = new bool[6] {true, false, false, false, false, false };
            //bool[] DaysOfWork1 = new bool[6] { true, false, false, false, false, false };

            //this.UserControOfTheWeek.daysOfWork1 =DaysOfWork1.DeepClone();
            //this.UserControOfTheWeek.TableOfWork1 = nanny.NannyTableOfWork.DeepClone();

            //  UserControOfTheWeek week = new UserControOfTheWeek(nanny.NannyDaysOfWork );
            // UserControOfTheWeek = week;
        }
Пример #8
0
        //private Type value;
        //private Type targetType;
        //private CultureInfo parameter;
        //private  System.Globalization. culture; culture;

        public AddContractWindow(Contract con = null)
        {
            InitializeComponent();
            if (con == null)
                contract = new Contract();
            else
            {
                this.Title = "Update contract";
                contract = con;
                UpdateFlag = true;
                AddContractbutton.Content = "Update contract details";
                //contractIdTextBox.IsReadOnly = true;
            }
            this.grid0.DataContext = contract;
            bl = FactoryIBL.getIBL();
            //int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            //this.shyComboBox.ItemsSource = a;
            //this.calmComboBox.ItemsSource = a;
            //this.friendlyComboBox.ItemsSource = a;
            errorMessages = new List<string>();


            this.nannyIdTextBox.ItemsSource = bl.GetNannyIEnumerable();
            this.nannyIdTextBox.DisplayMemberPath = "NannyId";
            this.nannyIdTextBox.SelectedValuePath = "NannyId";



           
            this.motherIdTextBox.ItemsSource = " ";
            this.motherIdTextBox.DisplayMemberPath = "MotherId";
            this.motherIdTextBox.SelectedValuePath = "MotherId";




            this.childIdTextBox.ItemsSource = bl.GetChildIEnumerable();
            this.childIdTextBox.DisplayMemberPath = "ChildId";
            this.childIdTextBox.SelectedValuePath = "ChildId";


        }
Пример #9
0
        //private Type value;
        //private Type targetType;
        //private CultureInfo parameter;
        //private  System.Globalization. culture; culture;

        public AddChildWindow(Child chi = null)
        {
            InitializeComponent();
            if (chi == null)
            {
                child = new Child();
            }
            else
            {
                this.Title                 = "Update child";
                child                      = chi;
                UpdateFlag                 = true;
                AddChildbutton.Content     = "Update child details";
                childIdTextBox.IsReadOnly  = true;
                motherIdTextBox.IsReadOnly = true;
            }
            this.grid0.DataContext = child;
            bl = FactoryIBL.getIBL();
            int[] a = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 };
            this.shyComboBox.ItemsSource      = a;
            this.calmComboBox.ItemsSource     = a;
            this.friendlyComboBox.ItemsSource = a;
            errorMessages = new List <string>();
        }