示例#1
0
 public void ContainsTextFirmaTest()
 {
     var firma = new Firma
     {
         Adresa = "abc",
         Cui = "cde",
         DataInfiintarii = DateTime.Now,
         Iban = "xyz",
         IdBanca = 2,
         IdDelegat = 2,
         Nume = "poi",
         Rc = "pay",
         Telefon = "y+2223"
     };
     string text = "21 2012";
     var actual = firma.Contains(text);
     var expected = true;
     Assert.AreEqual(expected, actual);
 }
示例#2
0
 public void InsertFirmaTest()
 {
     var firma = new Firma
     {
         Adresa = "Testing",
         Cui = "Testing",
         DataInfiintarii = DateTime.Now,
         Iban = "Testing",
         IdBanca = 1,
         IdDelegat = 1,
         Nume = "Testing",
         Rc = "Testing",
         Telefon = "Testing"
     };
     var r = firma.Save();
     if (r.Status != StatusEnum.Errors)
     {
         Assert.Fail();
     }
 }
示例#3
0
 private void AddEditFirmaForm_Load(object sender, EventArgs e)
 {
     if (FirmaObject == null)
     {
         FirmaObject = new Firma();
         this.Text = "Adauga firma";
     }
     else
     {
         this.Text = "Modifica firma";
         adresaTbox.Text = FirmaObject.Adresa;
         cuiTbox.Text = FirmaObject.Cui;
         ibanTbox.Text = FirmaObject.Iban;
         numeTbox.Text = FirmaObject.Nume;
         rcTbox.Text = FirmaObject.Rc;
         telefonTbox.Text = FirmaObject.Telefon;
         bancaCmb.SelectedValue = FirmaObject.IdBanca;
         delegatCmb.SelectedValue = FirmaObject.IdDelegat;
         dataDtp.Value = FirmaObject.DataInfiintarii;
     }
 }
 private void searchFirmaBtn_Click(object sender, EventArgs e)
 {
     var form = new SelectItemForm
     {
         Datas = Firma.GetAll().Cast<GestiuneObject>().ToList(),
         Text = "Cautare firma"
     };
     if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
         SelectedFirma = form.SelectedObject == null ? null : (Firma)form.SelectedObject;
 }