public Form1() { InitializeComponent(); Jenis.Items.Add("Trapesium"); Jenis.Items.Add("Segitiga"); labeltitik.Hide(); labelInterval.Hide(); A.Hide(); B.Hide(); C.Hide(); D.Hide(); labela.Hide(); labelb.Hide(); labelc.Hide(); labeld.Hide(); Submit.Hide(); alpha_cut.Hide(); labelAlpha.Hide(); chart1.Hide(); x.Hide(); labelx.Hide(); y.Hide(); labely.Hide(); }
public Units(char u, int i) { user = u; ID = i; InitializeComponent(); if (user == 'E') { ProjectApply.Enabled = false; Unit.Enabled = false; Submit.Enabled = false; MaxApplications.Hide(); } else { DataTable C = controllerObj.CountCitApplicationsbyCitizen(ID); count = Convert.ToInt32(C.Rows[0][0]); MaxApplications.Text = "Max. allowed active application and claimed units count = 3"; YourApplications.Text = "Your active application and claimed units count =" + Convert.ToString(count); } DataTable dt = controllerObj.SelectAllUnits(); dataGridView1.DataSource = dt; DataTable dp = controllerObj.GetAllProjectIDs(); ProjectSort.DataSource = dp; ProjectSort.DisplayMember = "ID"; ProjectSort.ValueMember = "ID"; DataTable dC = controllerObj.SelectProjectCities(); City.DataSource = dC; City.DisplayMember = "City"; City.ValueMember = "City"; for (int intCount = 0; intCount < dt.Rows.Count; intCount++) { var val = dt.Rows[intCount]["ProjectID"]; if (!ProjectApply.Items.Contains(val)) { ProjectApply.Items.Add(val); } } Unit.Hide(); LabelUnit.Hide(); Submit.Hide(); City.SelectedIndex = -1; ProjectSort.SelectedIndex = -1; }