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(); }
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); } } }
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); } } }
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; }