示例#1
0
 private void Unos()
 {
     using (var db = new KaficDB())
     {
         Kafic kafic = new Kafic
         {
             Ime     = txtIme.Text,
             Adresa  = txtAdresa.Text,
             Email   = txtmail.Text,
             OIB     = txtOib.Text,
             Telefon = txtTelefon.Text,
             IBAN    = txtIBAN.Text
         };
         db.Kafic.Add(kafic);
         db.SaveChanges();
     }
     StaticVarijable.bazaPrazna = false;
 }
示例#2
0
        private void DohvatiKafic()
        {
            using (var db = new KaficDB())
            {
                var upit = from k in db.Kafic select k;

                foreach (var k in upit.ToList <Kafic>())
                {
                    txtIme.Text     = k.Ime;
                    txtOib.Text     = k.OIB;
                    txtAdresa.Text  = k.Adresa;
                    txtmail.Text    = k.Email;
                    txtTelefon.Text = k.Telefon;
                    txtIBAN.Text    = k.IBAN;
                    kafic           = k;
                }
            }
        }
示例#3
0
 public frmKafic()
 {
     InitializeComponent();
     kafic = new Kafic();
 }