public void GetTaskDiffSetting(int idtaskdiff, DateTime beginbackup)
        {
            t     = new DataTable();
            DTask = new DiffTask();
            BDAL.OpenConnection();
            t = BDAL.SelCurrentDiffTask(idtaskdiff);
            BDAL.CloseConnection();

            DTask.Source    = (string)t.Rows[0]["source"];
            DTask.Dest      = (string)t.Rows[0]["dest"];
            DTask.Taskname  = (string)t.Rows[0]["task_name"];
            DTask.Selday    = (string)t.Rows[0]["sel_day"];
            DTask.Time      = (DateTime)t.Rows[0]["task_time"];
            DTask.Nextstart = (DateTime)t.Rows[0]["Next_Start"];
            DTask.Timelive  = (int)t.Rows[0]["time_live"];
            ////add 05.04.2017
            DTask.Extension = (string)t.Rows[0]["extension"];
            DTask.Password  = (string)t.Rows[0]["password"];
            DTask.Exeption  = (string)t.Rows[0]["exeption"];
            DTask.Ftp       = (int)t.Rows[0]["ftp"];

            DBC = new DiffBackupClass(DTask);
            TimeSpan RangeNextTask;

            RangeNextTask   = DTask.Nextstart - CurrentDateTime;
            TMDIFF          = new System.Timers.Timer();
            TMDIFF.Interval = Convert.ToInt32(RangeNextTask.TotalMilliseconds - 10000);
            TMDIFF.Elapsed += delegate(object sender, System.Timers.ElapsedEventArgs e)
            {
                TMDIFF_Elapsed(sender, e, DTask.Nextstart);
            };
            TMDIFF.Enabled = true;
        }
Exemple #2
0
 public DiffBackupClass(DiffTask dtask)
 {
     BDAL  = new BackuperDAL();
     DTask = dtask;
 }