示例#1
0
        public static string GetTemplatesDoc(IWin32Window owner, out bool returnCode)
        {
            var templatesDoc = ParameterUtil.GetParameter("templates_doc");

            if (String.IsNullOrEmpty(templatesDoc))
            {
                MMessageBox.Show(owner, "Thiếu thông tin cấu hình templates_doc", "Thông báo", MMessageBoxButtons.OK,
                                 MMessageBoxIcon.Warning);
                returnCode = false;
                return(templatesDoc);
            }
            if (!Directory.Exists(templatesDoc))
            {
                MMessageBox.Show(owner, "Không tồn tại thư mục: \"" + templatesDoc + "\"", "Thông báo", MMessageBoxButtons.OK,
                                 MMessageBoxIcon.Warning);
                returnCode = false;
                return(templatesDoc);
            }
            returnCode = true;
            return(templatesDoc);
        }
示例#2
0
        protected override void OnStart(string[] args)
        {
            long intervalTime;

            if (!long.TryParse(ParameterUtil.GetParameter("IntervalTime"), out intervalTime))
            {
                intervalTime = 300000; //every 5 minutes
            }
            double bonusTypeTtAmount;

            if (!double.TryParse(ParameterUtil.GetParameter("BonusTypeTtAmount"), out bonusTypeTtAmount))
            {
                bonusTypeTtAmount = 0.7;
            }
            ConstUtil.BONUS_TYPE_TT.Amount = bonusTypeTtAmount;
            timer1 = new Timer();
            this.timer1.Interval = intervalTime;
            this.timer1.Elapsed += new System.Timers.ElapsedEventHandler(this.timer1_Tick);
            this.service         = new Controller();
            timer1.Enabled       = true;
            timer1.Start();
            Library.WriteErrorLog("DCAP window service started");
        }
示例#3
0
 public static string GetPrefixAccountNumber()
 {
     return(ParameterUtil.GetParameter("PrefixAccountNumber"));
 }