Exemple #1
0
        private void GetInvoice()
        {
            DataTable fff  = new DataTable();
            var       orcc = new Assest.OrcDataAcess();

            orcc.show3(fff);
            var list   = new List <string>();
            int result = 0;

            foreach (DataRow R in fff.Rows)
            {
                //list.Add(R.Field<string>("NUMF"));
                result = int.Parse(R.Field <string>("NUMF"));
            }
            result        += 1;
            xrLabel11.Text = result.ToString();
        }
Exemple #2
0
        void GetPrice()
        {
            double    result  = 0;
            double    result1 = 0;
            var       result_ = new List <double>();
            DataTable dt      = new DataTable();
            var       acc     = new Assest.OrcDataAcess();

            acc.Show(dt);
            var Price = new List <string>();

            foreach (DataRow item in dt.Rows)
            {
                // Price.Add(item.Field<string>("Price_F").Replace("SAR",""));
                // result_.Add(double.Parse(item.Field<string>("Price_F").Replace("SAR", "")));
                result  += double.Parse(item.Field <string>("PRICE").Replace("SAR ", ""));
                result1 += double.Parse(item.Field <string>("PRICE_A").Replace("SAR ", ""));
            }

            T1.Text           = result.ToString("N0") + "ر.س";
            xrTableCell1.Text = result1.ToString("N0") + "ر.س";
        }
        public static void GET_STRATED()
        {
            var DataOprator = new Assest.OrcDataAcess();

            if (IsDay == true)
            {
                try
                {
                    foreach (DataRow r in Datatable.Rows)
                    {
                        DataOprator.insert4(r.Field <string>("DAT"),
                                            r.Field <string>("NAME"),
                                            r.Field <string>("PRICE"),
                                            "0",
                                            r.Field <string>("PRICE_A"),
                                            r.Field <string>("BARCODE"),
                                            r.Field <string>("NUMF"),
                                            r.Field <string>("DOW"),
                                            ("0"));
                    }
                    // DataOprator.Delete4();
                }
                catch (Exception ex)
                {
                    System.Windows.MessageBox.Show("Day_Section_Get_Started:" + ex.HResult.ToString());
                }
            }
            else if (IsMounth == true)
            {
                try {
                    foreach (DataRow r in Datatable.Rows)
                    {
                        DataOprator.insert4(r.Field <string>("DAT"),
                                            r.Field <string>("NAME"),
                                            r.Field <string>("PRICE"),
                                            "0",
                                            r.Field <string>("PRICE_A"),
                                            r.Field <string>("BARCODE"),
                                            r.Field <string>("NUMF"),
                                            r.Field <string>("DOW"),
                                            ("0"));
                    }
                }catch (Exception ex)
                {
                    System.Windows.MessageBox.Show("Month_Section_Get_started:" + ex.HResult.ToString());
                }
            }
            else if (IsYear == true)
            {
                try {
                    foreach (DataRow r in Datatable.Rows)
                    {
                        DataOprator.insert4(r.Field <string>("DAT"),
                                            r.Field <string>("NAME"),
                                            r.Field <string>("PRICE"),
                                            "0",
                                            r.Field <string>("PRICE_A"),
                                            r.Field <string>("BARCODE"),
                                            r.Field <string>("NUMF"),
                                            r.Field <string>("DOW"),
                                            ("0"));
                    }
                }
                catch (Exception ex)
                {
                }

                // DataOprator.Delete4();
            }
        }