Пример #1
0
 public void setRandomTasks()
 {
     int i,j;
     DateTime dt = DateTime.Now;
     Random rnd = new Random();
     j=rnd.Next(100);
     for (i = 0; i < j; i++)
     {
         newTask = new Base_Class.Task();
         newTask.orderDate = Convert.ToString(dt.Year) + "." + Convert.ToString(dt.Month) + "." + Convert.ToString(dt.Day);
         newTask.ownerName = "random owner";
         ObjList[rnd.Next(ObjList.Count)].AddTask(newTask);
     }
 }
Пример #2
0
 private void newToolStripMenuItem_Click(object sender, EventArgs e)
 {
     DateTime dt = DateTime.Now;
     newTask = new Base_Class.Task();
     selectedObject = ObjList.First(someObject => someObject.GetType().Name == treeView1.SelectedNode.Name);
     selectedObject.AddTask(newTask);
     
 }