Esempio n. 1
0
        private void FildPrivetOrders(bool?paid)
        {
            this.privetOrders.Clear();

            var rdg = new RDGs.RDGtblPrivetOrders(this.session.ConnectionString);

            foreach (var item in rdg.Get(paid))
            {
                this.privetOrders.Add(item);
            }
        }
Esempio n. 2
0
        public List <string> ListOfPrivateCustomersForInvoice()
        {
            var list   = new List <string>();
            var filter = new List <int>();

            var rdg = new RDGs.RDGtblPrivetOrders(this.session.ConnectionString);

            string temp = string.Empty;

            foreach (var item in rdg.Get(false))
            {
                if (!filter.Contains(item.Customer.PrivateCustomersNo))
                {
                    temp = "#";
                    if (item.Customer.PrivateCustomersNo < 10)
                    {
                        temp += "00" + item.Customer.PrivateCustomersNo;
                    }
                    else if (item.Customer.PrivateCustomersNo < 100)
                    {
                        temp += "0" + item.Customer.PrivateCustomersNo;
                    }
                    else
                    {
                        temp += item.Customer.PrivateCustomersNo;
                    }

                    temp += " - " + item.Customer.Name + " " + item.Customer.Surname;

                    list.Add(temp);

                    filter.Add(item.Customer.PrivateCustomersNo);
                }
            }

            list.Sort();

            return(list);
        }