Ejemplo n.º 1
0
        public static void Export()
        {
            Enums.Add(default(ECashItemType));

            using (var MetaFile = new CExcel(Enums, "bin", 4))
            {
                ulong CheckSum = 0;

                // Server Meta Datas ////////////////////////////////////////////////////////////////////////////////////////////////////
                Console.WriteLine("Exporting Server Meta Data");

                //MetaFile.Open("MetaDataXLS/forbidden_text.xlsx");
                //CheckSum ^= MetaFile.Export<SForbiddenTextMeta>("forbidden_text", "./MetaDataServer");

                //Console.WriteLine("Exporting Checksum Files");

                //var Stream = new CStream();
                //Stream.Push(CheckSum);
                //Stream.SaveFile("./MetaDataServer/checksum.bin");
                ////                Stream.SaveFile("./MetaData/checksum.bytes");


                MetaFile.Open("../../../Design/XmlTableFile/Config.xml");
                CheckSum ^= MetaFile.Export <SConfigMeta>("Config", "../../Bin/GameServer/GameServer/x64/MetaData");

                Console.WriteLine("Checksum : " + CheckSum.ToString());
                Console.WriteLine("Press Any Key To Exit");
                Console.ReadKey();
            }
        }
Ejemplo n.º 2
0
        public void Export()
        {
            try
            {
                int iCnt = 0;

                Load();
                //TODO: figure out why this.count is = to 0. it should be = to 2

                string[,] transactions = new string[this.Count + 1, 6];

                transactions[0, 0] = "Ticker";
                transactions[0, 1] = "Transaction Date";
                transactions[0, 2] = "Quantity";
                transactions[0, 3] = "Price";
                transactions[0, 4] = "Buy";

                while (iCnt < this.Count)
                {
                    iCnt++;
                    CTransaction v = this[iCnt - 1];
                    transactions[iCnt, 0] = v.Ticker.ToString();
                    transactions[iCnt, 1] = v.TransDate.ToString();
                    transactions[iCnt, 2] = v.Quantity.ToString();
                    transactions[iCnt, 3] = v.PricePerSharePaid.ToString();
                    transactions[iCnt, 4] = v.Buy.ToString();
                }

                CExcel.Export("Transaction.xlsx", transactions);
            }
            catch (Exception ex)
            {
                CErrorLog err = new CErrorLog();
                err.LogError(ex.Message);
                throw ex;
            }
        }