public BackupJobDetailsUI(string name, List <backup_pair> pairs, List <job_item> joblist)
        {
            InitializeComponent();
            textBox3.Text = name;

            if (pairs != null)
            {
                for (int i = 0; i < pairs.Count; i++)
                {
                    backup_pair bp = pairs.ElementAt(i);
                    dgv_fldlist.Rows.Add(new string[] { bp.SourcePath, bp.DestinationPath, (bp.IsFile)? "Y": "N" });
                }
                dgv_fldlist.Invalidate();
            }

            if (joblist != null)
            {
                for (int i = 0; i < joblist.Count; i++)
                {
                    job_item ji = joblist.ElementAt(i);
                    dgv_joblist.Rows.Add(new string[] { ji.JobID.ToString(), ji.JobName, ji.StartTime, DEFS.getDataInStringRep(ji.NewCopiedData) });
                }
                dgv_joblist.Invalidate();
            }
        }
Exemplo n.º 2
0
 public string fetch_job_name(int jobid)
 {
     for (int i = 0; i < jobhistory.Count; i++)
     {
         job_item ji = jobhistory.ElementAt(i);
         if (ji.JobID == jobid)
         {
             return(ji.JobName);
         }
     }
     return(null);
 }