Exemplo n.º 1
0
        public List <PArcelGroupSumType> GetParcelSums()
        {
            List <PArcelGroupSumType> l = new List <PArcelGroupSumType>();



            foreach (var dc in DicterType.ParcelGroups())
            {
                PArcelGroupSumType o = new PArcelGroupSumType();
                o.Name = dc.ParcelGroupName;
                l.Add(o);
            }



            foreach (var od in l)
            {
                foreach (var stop in STOPS)
                {
                    foreach (var parcel in stop.ParcelList)
                    {
                        foreach (var pg in parcel.PARCEL_GROUP)
                        {
                            if (pg.Name == od.Name)
                            {
                                od.IsTrue += pg.IsTrue;
                                od.isTrueDeliveredOnly += pg.isTrueDeliveredOnly;
                            }
                        }
                    }
                }
            }

            return(l);
        }
Exemplo n.º 2
0
 public void GetCennik()
 {
     Cennik = new List <CennikType>();
     foreach (CennikType c in DicterType.GetFullCennik())
     {
         if (c.Przewoznik_KOD == PrzewoznikKOD)
         {
             if (c.Rejon == Name)
             {
                 Cennik.Add(c);
             }
         }
     }
 }
Exemplo n.º 3
0
        public bool IsDelivered()
        {
            bool          returning = false;
            List <string> L         = DicterType.DeliveredCodes();


            foreach (var code in L)
            {
                if (STATUS_PRZE_W_KO == code)
                {
                    returning = true;
                }
            }

            Is_Delivered = returning;
            return(returning);
        }
Exemplo n.º 4
0
        public void GetParcelGroup()
        {
            List <ParcelGroupType> l = DicterType.ParcelGroups();

            PARCEL_GROUP = new List <PArcelGroupSumType> ();

            foreach (var od in l)
            {
                PArcelGroupSumType o = new PArcelGroupSumType();
                o.Name = od.ParcelGroupName;

                foreach (var prop in typeof(StopFileType).GetProperties())
                {
                    if (prop.Name == od.Column)
                    {
                        foreach (var pv in od.Parcelcodes())
                        {
                            string val = prop.GetValue(this).ToString();
                            if (pv == val)
                            {
                                o.IsTrue = 1;
                                if (od.TypStawki != StawkaTyp.BRAK)
                                {
                                    TypStawki = od.TypStawki;
                                }


                                if (Is_Delivered == true)
                                {
                                    o.isTrueDeliveredOnly = 1;
                                }
                            }
                        }
                    }
                }

                PARCEL_GROUP.Add(o);
            }
        }