Beispiel #1
0
 private void InitializeDataProcess()
 {
     List<Product> initProductLists = new List<Product>();
     DatasheetParser datasheetParser = new DatasheetParser();
     //pre-load the default datasheet
     string startupPath = Environment.CurrentDirectory;
     string defaultDatasheetFileName = startupPath.Replace("bin\\Debug", "") + @"..\datasheet.xlsx";
     datasheetParser.LoadDataSheetFile(defaultDatasheetFileName, out initProductLists);
     //append to the global list
     productLists.AddRange(initProductLists);
 }
Beispiel #2
0
        private void InitializeDataProcess()
        {
            List <Product>  initProductLists = new List <Product>();
            DatasheetParser datasheetParser  = new DatasheetParser();
            //pre-load the default datasheet
            string startupPath = Environment.CurrentDirectory;
            string defaultDatasheetFileName = startupPath.Replace("bin\\Debug", "") + @"..\datasheet.xlsx";

            datasheetParser.LoadDataSheetFile(defaultDatasheetFileName, out initProductLists);
            //append to the global list
            productLists.AddRange(initProductLists);
        }
Beispiel #3
0
        private void LoadDatasheet()
        {
            DatasheetParser datasheetParser = new DatasheetParser();
            List<Product> newProductLists = new List<Product>();
            using (OpenFileDialog openFileDialog1 = new OpenFileDialog()) {
                openFileDialog1.Filter = "All Excel Files(*.xlsx)|*.xlsx";
                if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK) {
                    string datasheetFileName = openFileDialog1.FileName.ToString();
                    datasheetParser.LoadDataSheetFile(datasheetFileName, out newProductLists);
                    //append the new product list to the existing one
                    productLists.AddRange(newProductLists);
                    //todo: show product list

                    //todo: show datasheet

                }
            }
        }
Beispiel #4
0
        private void LoadDatasheet()
        {
            DatasheetParser datasheetParser = new DatasheetParser();
            List <Product>  newProductLists = new List <Product>();

            using (OpenFileDialog openFileDialog1 = new OpenFileDialog()) {
                openFileDialog1.Filter = "All Excel Files(*.xlsx)|*.xlsx";
                if (openFileDialog1.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    string datasheetFileName = openFileDialog1.FileName.ToString();
                    datasheetParser.LoadDataSheetFile(datasheetFileName, out newProductLists);
                    //append the new product list to the existing one
                    productLists.AddRange(newProductLists);
                    //todo: show product list

                    //todo: show datasheet
                }
            }
        }