Exemple #1
0
 void LoadZamWgTrasy()
 {
     ZamowieniaViewListaNaglLst.Clear();
     if (Trasa != null)
     {
         foreach (IHP_NAGLDOK item in GetZamByIdTrasa(Trasa.ID_IHP_TRASY, _datedo))
         {
             ZamowieniaViewListaNaglLst.Add(item);
         }
     }
 }
Exemple #2
0
        private void UstawRok()
        {
            DateOd = new DateTime(DateTime.Today.Year, 1, 1);
            DateDo = new DateTime(DateTime.Today.Year, 12, 31);
            var zamowienia = context.Database.SqlQuery <ZamowieniaViewListaNagl>(string.Format(@"select N.ID_NAGL,K.ID_KONTRAH,N.DATADOK,N.TERMINREALIZ,N.NRDOKWEW,K.IMIE,K.NAZWISKO ,N.UWAGI from NAGL
                                                                                  N join KONTRAH K on K.id_kontrah = N.id_kontrah where N.DATADOK BETWEEN '{0}' and '{1}' order by TERMINREALIZ", DateOd.ToString("yyyy-MM-dd"), DateDo.ToString("yyyy-MM-dd"))).ToList();

            ZamowieniaViewListaNaglLst.Clear();
            foreach (ZamowieniaViewListaNagl item in zamowienia)
            {
                ZamowieniaViewListaNaglLst.Add(item);
            }
            KasujKolory();
            //KolorRok  = Color.FromRgb(135, 206, 250);
            wybierzrok = true;
            KolorRok   = (Color)ColorConverter.ConvertFromString("#FFCADBF3");
        }
Exemple #3
0
        private void UstawTydzien()
        {
            DayOfWeek fdow   = CultureInfo.CurrentCulture.DateTimeFormat.FirstDayOfWeek;
            int       offset = fdow - DateTime.Today.DayOfWeek - 1;

            DateOd = DateTime.Today.AddDays(offset);
            DateDo = DateOd.AddDays(7);
            var zamowienia = context.Database.SqlQuery <ZamowieniaViewListaNagl>(string.Format(@"select N.ID_NAGL,K.ID_KONTRAH,N.DATADOK,N.TERMINREALIZ,N.NRDOKWEW,K.IMIE,K.NAZWISKO ,N.UWAGI from NAGL
                                                                                  N join KONTRAH K on K.id_kontrah = N.id_kontrah where N.DATADOK BETWEEN '{0}' and '{1}' order by TERMINREALIZ", DateOd.ToString("yyyy-MM-dd"), DateDo.ToString("yyyy-MM-dd"))).ToList();

            ZamowieniaViewListaNaglLst.Clear();

            foreach (ZamowieniaViewListaNagl item in zamowienia)
            {
                ZamowieniaViewListaNaglLst.Add(item);
            }
            KasujKolory();
            wybierztydzien = true;
            //KolorTydzien  = Color.FromRgb(135, 206, 250);
            KolorTydzien = (Color)ColorConverter.ConvertFromString("#FFCADBF3");
        }