Пример #1
0
 /// <summary>
 /// Create a new Fakturi object.
 /// </summary>
 /// <param name="idFakturi">Initial value of the IdFakturi property.</param>
 public static Fakturi CreateFakturi(global::System.Int32 idFakturi)
 {
     Fakturi fakturi = new Fakturi();
     fakturi.IdFakturi = idFakturi;
     return fakturi;
 }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Fakturi EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToFakturi(Fakturi fakturi)
 {
     base.AddObject("Fakturi", fakturi);
 }
Пример #3
0
        private void buttonFakturiFAKTURI_D_Click(object sender, EventArgs e)
        {
            Cursor.Current = Cursors.WaitCursor;
            int i = 0;
            foreach (var fd in _mladinskaEntities.FAKTURI_D)
            {
                var fd1 = fd;
                if (_avtorskaEntities.Fakturi.Count(d => d.Broj == fd1.BROJ && d.Godina == fd1.GODINA && fd1.prazno=="D") == 0)
                {
                    var faktura = new Fakturi
                                      {
                                          Broj = fd1.BROJ,
                                          Godina = fd1.GODINA,
                                          Neto = (decimal?) fd1.NETO,
                                          DanocnaOsnovica = (decimal?) fd1.DANOSN,
                                          Personalen_Stapka = (decimal?) fd1.PERS_STAPKA1,
                                          PersonalenDanok = (decimal?) fd1.PERSDANOK1,
                                          Trosoci = (decimal?) fd1.TROSOCI,
                                          DDV_Osnovica = (decimal?) fd1.DDV_OSN,
                                          DDV_Iznos = (decimal?) fd1.DDV_IZN,
                                          DDV_Stapka = (decimal?) fd1.DDV_STAPKA,
                                          Iznos = (decimal?) fd1.IZNOS,
                                          Tekst = fd1.TEKST,
                                          DOG_K = fd1.DOG_K,
                                          GOD_K = fd1.GOD_K,
                                          Plateno = (decimal?) fd1.PLATENO,
                                          DatumPlateno = fd1.DATUMP,
                                          GL_Spisok = fd1.GL_SPISOK,
                                          GOD_S = fd1.GOD_S,
                                          prazno = "D",
                                          tempf = (decimal?) fd1.tempf,
                                          Seuste_Ne = fd1.SEUSTE_NE
                                      };
                    DateTime dateTime;
                    if (DateTime.TryParse(fd1.DATUMF, out dateTime))
                        if (dateTime >= Convert.ToDateTime("1753/1/1") && dateTime <= DateTime.MaxValue)
                            faktura.Datum = dateTime;

                    _avtorskaEntities.AddToFakturi(faktura);
                    _avtorskaEntities.SaveChanges();
                }
            }
            Cursor.Current = Cursors.Default;
            MessageBox.Show("FAKTURI_D => Fakturi : " + i);
        }