// Use this for initialization
    void Start()
    {
        slider          = this.GetComponent <Slider> ();
        slider.maxValue = (float)PD::Parameter.STEPS;
        slider.minValue = 0f;
        slider.value    = 0f;

        file_maker = GameObject.Find("FileMaker").GetComponent <FileMaker>();
    }
Пример #2
0
        public void Initialize()
        {
            Directory.SetCurrentDirectory(Path.GetTempPath());
            FileMaker fileMaker = new FileMaker(2, Path.GetTempPath(), RunWithoutIRT, swathMetrics, RTMetrics, 70, 2, 10, 1000, 50, 20, 5000, "Today")
            {
            };

            fileMaker.MakeMetricsPerSwathFile(swathMetrics);
            fileMaker.MakeMetricsPerRTsegmentFile(RTMetrics);
            fileMaker.MakeComprehensiveMetricsFile();
            fileMaker.MakeiRTmetricsFile(iRTrun);
            //fileMaker.AssembleMetrics();
        }
Пример #3
0
        internal IEnumerable <FileMaker> GetFileMaker(DateTime Start_Date)
        {
            string strSql = string.Empty;

            List <IDataParameter> para = null;

            DataTable dt = null;

            Utility utility = null;

            try
            {
                utility = new Utility();

                strSql = utility.Select.BATCH_CIF_INFO(Start_Date.ToString("yyyy/MM/dd 00:00:00"), Start_Date.ToString("yyyy/MM/dd 23:59:59"), Start_Date.ToString("yyyyMM"), ref para);

                #region SQL Debug

                this.WriteLog(Log.Mode.LogMode.DEBUG, strSql);

                this.WriteLog(Log.Mode.LogMode.DEBUG, para.ToLog());

                #endregion

                dt = utility.DBConn.GeneralSqlCmd.ExecuteToDataTable(strSql, para);

                this.WriteLog(Mode.LogMode.INFO, string.Format("共有{0}筆資料", dt.Rows.Count));

                if (dt.Rows.Count.Equals(0))
                {
                    this.WriteLastWorkingTime(utility); yield break;
                }
                string message = string.Empty;

                var query = from batch in dt.AsEnumerable()
                            select new
                {
                    CREATE_DATETIME      = batch.Field <DateTime>("CREATE_DATETIME"),
                    SESSION_KE           = batch.Field <string>("SESSION_KE"),
                    TXN_DATE             = batch.Field <DateTime>("TXN_DATE"),
                    TXN_ACCOUNT          = batch.Field <string>("TXN_ACCOUNT"),
                    BRANCH_ID            = batch.Field <string>("BRANCH_ID"),
                    FILE_ID              = batch.Field <string>("FILE_ID"),
                    FILE_CREATE_DATETIME = batch.Field <DateTime>("CREATE_DATETIME"),
                    FILE_SEQ             = batch.Field <Int16>("FILE_SEQ"),
                    FILE_ROOT            = batch.Field <string>("FILE_ROOT"),
                    FILE_PATH            = batch.Field <string>("FILE_PATH"),
                    PDF            = batch.Field <string>("PDF"),
                    FILE_TYPE      = batch.Field <Int16>("FILE_TYPE"),
                    T_MNEMONIC     = batch.Field <string>("T_MNEMONIC"),
                    T_EMAIL_SIGN_1 = batch.Field <string>("T_EMAIL_SIGN_1"),
                    T_EMAIL_1      = batch.Field <string>("T_EMAIL_1")
                };



                foreach (var batch in query)
                {
                    FileMaker fileMaker = new FileMaker()
                    {
                        CREATE_DATETIME      = batch.CREATE_DATETIME,
                        SESSION_KE           = batch.SESSION_KE,
                        TXN_DATE             = batch.TXN_DATE,
                        TXN_ACCOUNT          = batch.TXN_ACCOUNT,
                        BRANCH_ID            = batch.BRANCH_ID,
                        FILE_ID              = batch.FILE_ID,
                        FILE_CREATE_DATETIME = batch.CREATE_DATETIME,
                        FILE_SEQ             = batch.FILE_SEQ,
                        FILE_ROOT            = batch.FILE_ROOT,
                        FILE_PATH            = batch.FILE_PATH,
                        PDF            = batch.PDF,
                        FILE_TYPE      = batch.FILE_TYPE,
                        T_MNEMONIC     = batch.T_MNEMONIC,
                        T_EMAIL_SIGN_1 = batch.T_EMAIL_SIGN_1,
                        T_EMAIL_1      = batch.T_EMAIL_1
                    };

                    yield return(fileMaker);
                }
            }
            //catch (Exception ex)
            //{
            //    throw new Exception(string.Format("GetFileMakerError:{0}", ex.Message));
            //}
            finally
            {
                if (utility != null)
                {
                    utility.CloseConn();

                    utility = null;
                }

                dt = null;

                para = null;

                GC.Collect(); GC.WaitForPendingFinalizers();
            }
        }