Exemplo n.º 1
0
        private void showwait(object obj)
        {
            // View.Caculating wat = new View.Caculating();

            //            View.Caculating wat = (View.Caculating)obj;
            datashowwait obshow = (datashowwait)obj;

            View.MKTCaculating wat = obshow.wat;

            wat.ShowDialog();
        }
Exemplo n.º 2
0
        public void addcustomerinputshiptocode()
        {
            //   CultureInfo provider = CultureInfo.InvariantCulture;


            OpenFileDialog theDialog = new OpenFileDialog();

            theDialog.Title            = "Open Excel File Shiptocode excel";
            theDialog.Filter           = "Excel files|*.xlsx; *.xls";
            theDialog.InitialDirectory = @"C:\";
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                //  AutoResetEvent autoEvent = new AutoResetEvent(false); //join



                string filename = theDialog.FileName.ToString();
                Thread t1       = new Thread(addShiptolist);
                t1.IsBackground = true;
                t1.Start(new datainportF()
                {
                    filename = filename
                });


                View.MKTCaculating wat = new View.MKTCaculating();
                Thread             t2  = new Thread(showwait);
                t2.Start(new datashowwait()
                {
                    wat = wat
                });


                t1.Join();
                if (t1.ThreadState != ThreadState.Running)
                {
                    // t2.Abort();

                    wat.Invoke(wat.myDelegate);
                }
            }



            //throw new NotImplementedException();
        }
Exemplo n.º 3
0
        public void Inputapprovalpayment()
        {
            //   CultureInfo provider = CultureInfo.InvariantCulture;


            OpenFileDialog theDialog = new OpenFileDialog();

            theDialog.Title            = "Open Excel File aproval payment excel";
            theDialog.Filter           = "Excel files|*.xlsx; *.xls";
            theDialog.InitialDirectory = @"C:\";
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                //  AutoResetEvent autoEvent = new AutoResetEvent(false); //join



                string filename = theDialog.FileName.ToString();
                string username = Utils.getusername();

                Thread t1 = new Thread(Inputapprovalpaymentcode);
                t1.IsBackground = true;
                t1.Start(new datainportF()
                {
                    filename = filename, username = username
                });


                View.MKTCaculating wat = new View.MKTCaculating();
                Thread             t2  = new Thread(showwait);
                t2.Start(new datashowwait()
                {
                    wat = wat
                });


                t1.Join();
                if (t1.ThreadState != ThreadState.Running)
                {
                    // t2.Abort();

                    wat.Invoke(wat.myDelegate);
                }
            }
        }
Exemplo n.º 4
0
        public void ADDnewproductlist(string shipingpoint)
        {
            //   CultureInfo provider = CultureInfo.InvariantCulture;


            OpenFileDialog theDialog = new OpenFileDialog();

            theDialog.Title            = "Open Excel File Product excel";
            theDialog.Filter           = "Excel files|*.xlsx; *.xls";
            theDialog.InitialDirectory = @"C:\";
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                //  AutoResetEvent autoEvent = new AutoResetEvent(false); //join



                string filename      = theDialog.FileName.ToString();
                string storelocation = shipingpoint;

                Thread t1 = new Thread(Addnewproduct);
                t1.IsBackground = true;
                t1.Start(new datainportF()
                {
                    filename = filename, storelocation = storelocation
                });


                View.MKTCaculating wat = new View.MKTCaculating();
                Thread             t2  = new Thread(showwait);
                t2.Start(new datashowwait()
                {
                    wat = wat
                });


                t1.Join();
                if (t1.ThreadState != ThreadState.Running)
                {
                    // t2.Abort();

                    wat.Invoke(wat.myDelegate);
                }
            }
        }
Exemplo n.º 5
0
        public void productlistinput()
        {
            //   CultureInfo provider = CultureInfo.InvariantCulture;

            OpenFileDialog theDialog = new OpenFileDialog();

            theDialog.Title            = "Open Excel File Product list excel";
            theDialog.Filter           = "Excel files|*.xlsx; *.xls";
            theDialog.InitialDirectory = @"C:\";
            if (theDialog.ShowDialog() == DialogResult.OK)
            {
                string filename = theDialog.FileName.ToString();

                Thread t1 = new Thread(importsexcel);
                t1.IsBackground = true;
                t1.Start(new datainportF()
                {
                    filename = filename
                });


                View.MKTCaculating wat = new View.MKTCaculating();
                Thread             t2  = new Thread(showwait);
                t2.Start(new datashowwait()
                {
                    wat = wat
                });


                t1.Join();
                if (t1.ThreadState != ThreadState.Running)
                {
                    // t2.Abort();

                    wat.Invoke(wat.myDelegate);
                }
            }



            //  return true;
        }