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"; } }
public EditPlaceForm(MySqlDataReader rdr, string formname) { InitializeComponent(); this.Text = formname; if (formname == "Wyświetl dane miejsca") { OKButton.Hide(); ApplyButton.Hide(); CancelButton.Text = "OK"; PlaceNameBox.Enabled = false; } id = rdr.GetInt16(0); name = rdr.GetString(1); PlaceNameBox.Text = name; IDLabel.Text += " " + id; rdr.Close(); }
public ViewJob() { InitializeComponent(); SqlConnection con = new SqlConnection(@"Data Source=OLA\SQLSERVER;Initial Catalog=ApplicantTrackingSystem;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=False"); con.Open(); SqlCommand cmd = new SqlCommand("Select * from [Application] where CandidateUsername=@Username and JobID=@ID", con); cmd.Parameters.AddWithValue("@Username", UserLogin.LocalUsername); cmd.Parameters.AddWithValue("@ID", CandidateHome.LocalJobID); SqlDataReader rdr = cmd.ExecuteReader(); while (rdr.Read()) { ApplyButton.Hide(); } con.Close(); }
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; } }
public PaymentForm(int id, string n, string f1) { InitializeComponent(); login = n; id_user = id; ToDateForm.Value = DateTime.Now; to_date = ToDateForm.Value; TimeSpan ts = new TimeSpan(30, 0, 0, 0, 0); from_date = to_date - ts; FromDateBox.Value = from_date; UserLogin.Text += login; this.Text = f1; form_name = f1; if (form_name == "Wyświetlanie płatności") { DataBox.ReadOnly = true; OKButton.Hide(); ApplyButton.Hide(); CancelButton.Text = "OK"; } //UpdateData(); }