public void Refresh4() { OpenConnectionCorrect(conn); dataGridView4.DataSource = RequestsSQLT.SelectAllFromApartments(conn); ElementsSettings.SetDefaultSettingsToDGV(dataGridView4); ElementsSettings.RenameApartmentsDGV(dataGridView4); }
public void Refresh1() { OpenConnectionCorrect(conn); dataGridView1.DataSource = RequestsSQLT.SelectAllFromCustomer(conn); ElementsSettings.SetDefaultSettingsToDGV(dataGridView1); ElementsSettings.RenameCustomerDGV(dataGridView1); }
public AddingNewCustomer() { InitializeComponent(); textBox1.Text = Form1.textBox2StaticValue; textBox2.Text = Form1.textBox3StaticValue; textBox3.Text = Form1.textBox4StaticValue; textBox4.Text = Form1.textBox5StaticValue; textBox5.Text = Form1.textBox6StaticValue; ancBirthdayDateTimePicker.Value = Form1.dateTimePicker1StaticValue.Value; textBox7.Text = Form1.textBox8StaticValue; Form1.OpenConnectionCorrect(Form1.conn); ElementsSettings.SetDefaultSettingsToDGV(dataGridViewANC); dataGridViewANC.DataSource = RequestsSQLT.SelectAllFromApartments(Form1.conn); for (int i = 0; i < RequestsSQLT.comboElements.Count; i++) { typeOfApartmentsComboBox.Items.Add(RequestsSQLT.comboElements[i]); } discountTextBox.Text = Form1.discount.ToString(); if (Form1.cb == true) { ancSettlingDateTimePicker.Value = Convert.ToDateTime(Form1.bookingS[2]); ancEvictionDateTimePicker.Value = Convert.ToDateTime(Form1.bookingS[3]); textBox13.Text = Form1.bookingS[5]; textBox14.Text = Form1.bookingS[6]; dataGridViewANC.DataSource = RequestsSQLT.SelectAllFromApartmentsWhereNumberIsSet(Form1.conn, Convert.ToInt32(Form1.bookingS[4])); } ElementsSettings.RenameApartmentsDGV(dataGridViewANC); CheckAndAddCustomerData.Enabled = false; CheckAndAddВookingData.Enabled = false; }
private void moveToLivingsButton_Click(object sender, EventArgs e) { dataGridView2.DataSource = RequestsSQLT.SelectAllFromLivingByCustomerId(conn, idOfChosenRow1); ElementsSettings.SetDefaultSettingsToDGV(dataGridView2); ElementsSettings.HideFirstXColumns(dataGridView2, 2); ElementsSettings.HideLastXColumns(dataGridView2, 2); tabControl1.SelectedIndex = 1; }
public void Refresh3() { OpenConnectionCorrect(conn); dataGridView3.DataSource = RequestsSQLT.SelectAllFromBooking(conn); ElementsSettings.SetDefaultSettingsToDGV(dataGridView3); ElementsSettings.HideFirstXColumns(dataGridView3, 2); ElementsSettings.HideLastXColumns(dataGridView3, 2); ElementsSettings.RenameLivingOrBookingDGV(dataGridView3); }