Beispiel #1
0
 public AddAdminForm(string formname, int id_n)
 {
     InitializeComponent();
     this.Text = formname;
     if (formname == "Dodawanie Administratora")
     {
         IDLabel.Hide();
         choice = 1;
     }
     if (formname == "Edycja danych Administratora")
     {
         id     = id_n;
         choice = 2;
         UpdateData();
     }
     if (formname == "Wyświetlanie danych Administratora")
     {
         id     = id_n;
         choice = 3;
         UpdateData();
         LoginBox.Enabled    = false;
         PasswordBox.Enabled = false;
         TypeBox.Enabled     = false;
         OKButton.Hide();
         ApplyButton.Hide();
         CancelButton.Text = "OK";
     }
 }
Beispiel #2
0
 public AddPaymentForm(int id, string n, decimal m)
 {
     InitializeComponent();
     id_user              = id;
     name                 = n;
     old_money            = m;
     UserLogin.Text      += name;
     DateCheckBox.Checked = true;
     HourBox.Hide();
     MinuteBox.Hide();
     TimeLabel.Hide();
     IDLabel.Hide();
     IDComboBox.Hide();
     hLabel.Hide();
     mLabel.Hide();
 }
Beispiel #3
0
 public AddECostForm(int id, string n, string formname)
 {
     InitializeComponent();
     id_user   = id;
     login     = n;
     this.Text = formname;
     if (formname == "Dodawanie kosztu dodatkowego")
     {
         NoRButton.Checked = true;
         paid = false;
         IDComboBox.Hide();
         IDLabel.Hide();
         PayInfo(id);
         DateCheckBox.Checked = true;
         choice = 1;
     }
     else if (formname == "Wyświetlanie kosztów dodatkowych")
     {
         UpdateData(id);
         DescriptionBox.Enabled = false;
         MoneyBox.Enabled       = false;
         DateBox.Enabled        = false;
         YesRButton.Enabled     = false;
         NoRButton.Enabled      = false;
         ApplyButton.Hide();
         OKButton.Hide();
         CancelButton.Text = "OK";
         DateCheckBox.Hide();
         DateBox.Format       = DateTimePickerFormat.Custom;
         DateBox.CustomFormat = "dd.MM.yyyy HH:mm";
         choice = 2;
     }
     else if (formname == "Edycja kosztów dodatkowych")
     {
         UpdateData(id);
         ApplyButton.Text = "Zastosuj zmiany";
         now = false;
         DateCheckBox.Checked = false;
         choice = 3;
     }
 }
Beispiel #4
0
        private void Start()
        {
            AddQuestionButton.Hide();
            DeleteAnswersButton.Show();
            ResetButton.Show();
            NextButton.Show();
            InitializeVisited();
            ResetCorecteGresite();
            StartButton.Hide();
            IDLabel.Hide();
            IDTextField.Hide();

            TimeLeft = 1800;
            Timp.Start();
            TimeLabel.Show();

            List <model.Question> questions = QuestionRepository.ReadAllQuestions();

            quizController = new controller.QuizController();
            QuestionNumber = 0;

            DisplayQuestion(0);
        }
Beispiel #5
0
 public EditBikeForm(MySqlDataReader rdr, string formname)
 {
     InitializeComponent();
     this.Text = formname;
     EdBikeNumTBox.Hide();
     BikeNumLabel.Hide();
     if (formname == "Wyświetl dane roweru")
     {
         EdBikeNumTBox.Enabled     = false;
         EdBikePlaceCBox.Enabled   = false;
         RentYesRButton.Enabled    = false;
         RentNoRButton.Enabled     = false;
         EdBikeUsLoginCBox.Enabled = false;
         BikeStatusBox.Enabled     = false;
         OKButton.Hide();
         EditBikeButton.Hide();
         CancelButton.Text = "OK";
         edit_mode         = false;
         choice            = 1;
     }
     if (formname == "Edytuj dane roweru")
     {
         choice = 2;
     }
     if (formname != "Dodaj rower")
     {
         ImportData(rdr);
         rdr.Close();
         AddAllPlaces();
         IDLabel.Text      += "  " + id;
         EdBikeNumTBox.Text = number.ToString();
         if (rent)
         {
             RentYesRButton.Checked = true;
             RentNoRButton.Checked  = false;
             //EdBikeUsLoginCBox.Enabled = true;
             AddAllUsers();
             SelectUser(id_user);
             EdBikeUsLoginCBox.SelectedIndex = EdBikeUsLoginCBox.FindStringExact(user_login);
         }
         else
         {
             RentNoRButton.Checked     = true;
             RentYesRButton.Checked    = false;
             EdBikeUsLoginCBox.Enabled = false;
         }
         //tutaj jeszcze powinno wybrać miejsce?
         SelectPlace(id_place);
         EdBikePlaceCBox.SelectedIndex = EdBikePlaceCBox.FindStringExact(place);
         BikeStatusBox.SelectedIndex   = BikeStatusBox.FindStringExact(status);
     }
     else
     {
         AddAllPlaces();
         AddAllUsers();
         IDLabel.Hide();
         RentBikeLabel.Hide();
         LoginUserLabel.Hide();
         EdBikeUsLoginCBox.Hide();
         RentYesRButton.Hide();
         RentNoRButton.Hide();
         EditBikeButton.Text = "Zastosuj";
         choice = 3;
     }
 }