Ejemplo n.º 1
0
 public void Refresh4()
 {
     OpenConnectionCorrect(conn);
     dataGridView4.DataSource = RequestsSQLT.SelectAllFromApartments(conn);
     ElementsSettings.SetDefaultSettingsToDGV(dataGridView4);
     ElementsSettings.RenameApartmentsDGV(dataGridView4);
 }
Ejemplo n.º 2
0
 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;
 }