Пример #1
0
        private void FildCompanyOrders(bool?paid)
        {
            this.companyOrders.Clear();

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

            foreach (var item in rdg.Get(paid))
            {
                this.companyOrders.Add(item);
            }
        }
Пример #2
0
        public List <string> ListOfCompanyCustomersForInvoice()
        {
            var list   = new List <string>();
            var filter = new List <int>();

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

            string temp = string.Empty;

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

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

                    list.Add(temp);

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

            list.Sort();

            return(list);
        }