Example #1
0
 private void fillTextFields()
 {
     if (data.isPerson(clientId))
     {
         textBoxClientName.Text    = person.Name;
         textBoxClientSurname.Text = person.Surname;
         textBoxAddress.Text       = client.Adress;
         textBoxTelephone.Text     = client.Telephone;
     }
     else if (data.isCompany(clientId))
     {
         textBoxClientName.Text    = company.Name;
         textBoxClientSurname.Text = company.Code;
         textBoxAddress.Text       = client.Adress;
         textBoxTelephone.Text     = client.Telephone;
     }
 }
Example #2
0
 private void UpdateClientForm_Load(object sender, EventArgs e)
 {
     data   = new DataController();
     client = data.findClient(clientId);
     if (data.isPerson(clientId))
     {
         textClient1.Text = "Vardas";
         textClient2.Text = "Pavarde";
         client           = data.findClient(clientId);
         person           = data.findPerson(clientId);
     }
     else if (data.isCompany(clientId))
     {
         textClient1.Text = "Pavadinimas";
         textClient2.Text = "Kodas";
         client           = data.findClient(clientId);
         company          = data.findCompany(clientId);
     }
     fillTextFields();
 }