Exemplo n.º 1
0
        private void k100_()
        {
            try
            {
                Barco = Barcode.Text + "\n";
                DataTable Datatable  = new DataTable();
                DataTable _datatable = new DataTable();

                var OracleData = new Assest.OrcDataAcess();
                OracleData.Show(Datatable);
                listStrings.Clear();
                listStrings1.Clear();
                listStrings2.Clear();
                liqua.Clear();
                liststring4.Clear();

                foreach (DataRow Dt in Datatable.Rows)
                {
                    listStrings.Add(Dt.Field <string>("BARCODE"));
                    listStrings1.Add(Dt.Field <string>("NAME"));
                    listStrings2.Add(Dt.Field <string>("PRICE"));
                    liqua.Add(Dt.Field <string>("QUANTITY"));
                    liststring4.Add(Dt.Field <String>("ID"));
                    liststring8.Add(Dt.Field <String>("Dis"));
                }

                int numric = 0;

                for (int i = 0; i < listStrings.Count; i++)
                {
                    if (listStrings[i] == Barcode.Text || listStrings[i] == Barcode.Text + "\n")
                    {
                        Name.Text  = listStrings1[i];
                        price.Text = getwholeprice(i, listStrings2, liststring8).ToString();
                        Quan_li    = int.Parse(liqua[i]);
                        id_li      = liststring4[i];
                        numric++;
                        break;
                    }
                }
                if (numric == 0)
                {
                    DXMessageBox.Show("لم يتم العثور على نتيجة", "خطـأ", MessageBoxButton.OK, MessageBoxImage.Error);
                    Exists = 0;
                }
                if (numric != 0)
                {
                    Exists = 1;
                    PPP();
                }
            }
            catch (Exception ex) { }
        }