Esempio n. 1
0
 public void searcC()
 {
     foreach (Control ctrl in mainContainer.Controls)
     {
         ctrl.Dispose();
     }
     mainContainer.Controls.Add(new formClient());
     tabele.Client         x   = new tabele.Client();
     metodeTabele.metodele str = new metodeTabele.metodele();
     //x = str.readFurnizor(cautaToken.Text.ToString());
 }
Esempio n. 2
0
 private void modificaBtt_Click(object sender, EventArgs e)
 {
     tabele.Client         model  = new tabele.Client();
     metodeTabele.metodele update = new metodeTabele.metodele();
     model.NumeClient        = NumeClientTxt.Text.ToString();
     model.Filiala           = FilialaTxt.Text.ToString();
     model.CodClient         = CodClientTxt.Text.ToString();
     model.CodTvaClient      = CodTvaClientTxt.Text.ToString();
     model.PersoanaDeContact = PersoanaDeContactTxt.Text.ToString();
     model.NrReg             = NrRegTxt.Text.ToString();
     model.AdresaSediu       = AdresaSediuTxt.Text.ToString();
     model.AdresaDeLivrare   = AdresaDeLivrareTxt.Text.ToString();
     model.Email             = EmailClientTxt.Text.ToString();
     model.Telefon           = TelefonTxt.Text.ToString();
     model.ZonaClient        = ZonaClientTxt.Text.ToString();
     model.Judet             = JudetTxt.Text.ToString();
     update.modificaClient(model);
     return;
 }
Esempio n. 3
0
 private void salveazaBtt_Click(object sender, EventArgs e)
 {
     tabele.Client model = new tabele.Client();
     try
     {
         model.Filiala           = FilialaTxt.Text.ToString();
         model.NumeClient        = NumeClientTxt.Text.ToString();
         model.CodClient         = CodClientTxt.Text.ToString();
         model.CodTvaClient      = CodTvaClientTxt.Text.ToString();
         model.NrReg             = NrRegTxt.Text.ToString();
         model.AdresaSediu       = AdresaSediuTxt.Text.ToString();
         model.AdresaDeLivrare   = AdresaDeLivrareTxt.Text.ToString();
         model.PersoanaDeContact = PersoanaDeContactTxt.Text.ToString();
         model.Email             = EmailClientTxt.Text.ToString();
         model.Telefon           = TelefonTxt.Text.ToString();
         model.ZonaClient        = ZonaClientTxt.Text.ToString();
         model.Judet             = JudetTxt.Text.ToString();
         if (!IsValidEmail(model.Email))
         {
             throw new ArgumentException("Email invalid.");
         }
         else if (model.Filiala.Length * model.NumeClient.Length * model.CodClient.Length *
                  model.CodTvaClient.Length * model.NrReg.Length * model.AdresaSediu.Length *
                  model.AdresaDeLivrare.Length * model.PersoanaDeContact.Length * model.Email.Length *
                  model.Telefon.Length * model.ZonaClient.Length * model.Judet.Length == 0)
         {
             throw new ArgumentException("Camp necompletat.");
         }
         else
         {
             metodeTabele.metodele add = new metodeTabele.metodele();
             add.adaugaClient(model);
             MessageBox.Show("Operatiune efectuata cu succes.");
         }
     }
     catch (Exception err)
     {
         MessageBox.Show(err.Message);
     }
 }