private void addChildButton_Click(object sender, RoutedEventArgs e) { childSignUp signUp = new childSignUp(); signUp.roomID.Visibility = Visibility.Hidden; signUp.Show(); }
private void addChildButton_Click(object sender, RoutedEventArgs e) { childSignUp signChild = new childSignUp(); signChild.ShowDialog(); loadChildren(); }
private void addChildButton_Click(object sender, RoutedEventArgs e) { if (signedUp == true) { childSignUp signUp = new childSignUp(); signUp.roomID.Visibility = Visibility.Hidden; signUp.Show(); } else { MessageBox.Show("Please Sign Up first", "Error", MessageBoxButton.OK, MessageBoxImage.None); } }
private void parentGrid_MouseDown(object sender, MouseButtonEventArgs e) { if (previousForm == 0) { childWindow cw = new childWindow(pWindow); cw.dailyDetails.IsReadOnly = true; GlobalVariables.globalChild = mChild; cw.sendDailyDetails.Visibility = Visibility.Hidden; cw.roomID.IsEnabled = false; cw.editProfileButton.Visibility = Visibility.Visible; cw.showDailyDetails.Visibility = Visibility.Visible; cw.fillProfile(); cw.ShowDialog(); } else if (previousForm == 1) { childWindow cw = new childWindow(pWindow); cw.roomID.IsReadOnly = true; cw.childName.IsReadOnly = true; cw.DOBpicker.IsEnabled = false; cw.editProfileButton.Visibility = Visibility.Hidden; cw.female.IsEnabled = false; cw.male.IsEnabled = false; cw.showDailyDetails.Visibility = Visibility.Hidden; GlobalVariables.globalChild = mChild; cw.fillProfile(); cw.ShowDialog(); } else if (previousForm == 2) { //from pending //disable all texts and buttons if (idx == 0) // Holding child { GlobalVariables.globalChild = mChild; childSignUp window = new childSignUp(); window.signUpButton.Visibility = Visibility.Hidden; window.childFeaturesList.IsEnabled = false; window.roomID.Visibility = Visibility.Visible; //fill child data here ImageOperation op = new ImageOperation(); if (op.BinaryToImage(GlobalVariables.globalChild.image) != null) { window.profileImage.ImageSource = op.BinaryToImage(GlobalVariables.globalChild.image); } window.fillCdata(); window.disabledChild_info(); window.ShowDialog(); } else if (idx == 1) // Holding Parent { GlobalVariables.globalParent = mParent; parentSignUp window = new parentSignUp(); //fill parent data here window.fillPdata1(); window.OKButton.Visibility = Visibility.Hidden; window.disabledParent_info1(); //fill parent data here window.ShowDialog(); } else if (idx == 2) //Holding Staff { GlobalVariables.globalStaff = mStaff; staffSignUp window = new staffSignUp(); window.signUpButton.Visibility = Visibility.Hidden; //fill staff data here window.fillSdata(); window.disabledStaff(); window.salary.Visibility = Visibility.Visible; window.roomID.Visibility = Visibility.Visible; window.OKButton.Visibility = Visibility.Visible; //fill staff data here window.ShowDialog(); } } else if (previousForm == 3) { //from editDatabase if (idx == 0) // Holding child { GlobalVariables.globalChild = mChild; childSignUp window = new childSignUp(); window.signUpButton.Visibility = Visibility.Hidden; window.OKButton.Visibility = Visibility.Visible; window.roomID.Visibility = Visibility.Visible; ImageOperation op = new ImageOperation(); if (op.BinaryToImage(GlobalVariables.globalChild.image) != null) { window.profileImage.ImageSource = op.BinaryToImage(GlobalVariables.globalChild.image); } //fill child data here window.fillCdata(); window.ShowDialog(); } else if (idx == 1) // Holding Parent { GlobalVariables.globalParent = mParent; parentSignUp window = new parentSignUp(); //fill parent data here window.fillPdata1(); window.ID.IsEnabled = false; window.username.IsEnabled = false; //fill parent data here window.ShowDialog(); } else if (idx == 2) //Holding Staff { GlobalVariables.globalStaff = mStaff; staffSignUp window = new staffSignUp(); window.signUpButton.Visibility = Visibility.Hidden; window.ID.IsEnabled = false; window.OKButton.Visibility = Visibility.Visible; window.username.IsEnabled = false; window.ID.IsEnabled = false; window.salary.Visibility = Visibility.Visible; window.roomID.Visibility = Visibility.Visible; window.OKButton.Visibility = Visibility.Visible; //fill staff data here window.fillSdata(); //fill staff data here window.ShowDialog(); } } }