Exemple #1
0
        private void searching(string Text)
        {
            Datatable.Clear();
            show.show3(Datatable);
            List <string> GetDetailsFromNumOfRess = new List <string>();
            List <string> arr1 = new List <string>();
            List <string> arr2 = new List <string>();
            List <string> arr3 = new List <string>();
            List <string> arr4 = new List <string>();
            List <string> arr5 = new List <string>();
            List <string> arr6 = new List <string>();

            DevExpress.Xpf.Core.ObservableCollectionCore <Data> GetDetails = new DevExpress.Xpf.Core.ObservableCollectionCore <Data>();
            foreach (DataRow r in Datatable.Rows)
            {
                GetDetailsFromNumOfRess.Add(r.Field <string>("NUMF"));
                arr1.Add(r.Field <string>("NAME"));
                arr2.Add(r.Field <string>("PRICE"));
                arr3.Add(r.Field <string>("PRICE_A"));
                arr4.Add(r.Field <string>("DOW"));
                arr5.Add(r.Field <string>("BARCODE"));
                arr6.Add(r.Field <string>("DAT"));
            }


            for (int i = 0; i < GetDetailsFromNumOfRess.Count; i++)
            {
                if (GetDetailsFromNumOfRess[i] == Text)
                {
                    GetDetails.Add(new Data()
                    {
                        NAME    = arr1[i],
                        PRICE_A = arr3[i],
                        BARCODE = arr5[i],
                        DAT     = arr6[i],
                        PRICE   = arr2[i],
                        DOW     = arr4[i],
                        NUMF    = GetDetailsFromNumOfRess[i]
                    });
                    DD.ItemsSource = GetDetails;
                }
            }
        }
        private void ADD_LOA_MAX()
        {
            try
            {
                DevExpress.Xpf.Core.ObservableCollectionCore <func_> ADDMAX = new DevExpress.Xpf.Core.ObservableCollectionCore <func_>();


                ADDMAX.Add(new func_()
                {
                    NAME     = name.Text,
                    BARCODE  = bar.Text,
                    PRICE    = pri.Text,
                    PRICE_A  = pri_a.Text,
                    QUANTITY = qua.Text,
                    Dis      = "%" + Dis_add.Text,
                    Price_F  = GetPriceF(Models.RepAir.AddMode)
                });
                DD.ItemsSource = ADDMAX;
            }
            catch (Exception ex) { }
        }