Esempio n. 1
0
        private void newTaskOn_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentTask == null)
            {
                return;
            }
            CranTaskInfo newTask = new CranTaskInfo();

            newTask.init          = true;
            newTask.TaskAction    = CranTaskAction.create;
            newTask.canChange     = true;
            newTask.canCheck      = false;
            newTask.CranNumber    = CurrentTask.CranNumber;
            newTask.Comment       = CurrentTask.Comment;
            newTask.TaskState     = CranTaskState.created;
            newTask.NeedStartDate = CurrentTask.NeedEndDate;
            newTask.NeedEndDate   = CurrentTask.NeedEndDate.AddHours(12);
            newTask.SelAuthor     = CurrentTask.SelAuthor;
            newTask.Manager       = CurrentTask.Manager;
            newTask.StropUser     = CurrentTask.StropUser;
            CranWindow taskWindow = new CranWindow();

            taskWindow.init(newTask, Managers, StropUsers);
            taskWindow.Closed += taskWindow_Closed;
            IsOperating        = true;
            taskWindow.Show();
        }
Esempio n. 2
0
        private void btnChange_Click(object sender, RoutedEventArgs e)
        {
            if (CurrentTask == null)
            {
                return;
            }
            CurrentTask.TaskAction = CranTaskAction.change;
            CranWindow taskWindow = new CranWindow();

            taskWindow.init(CurrentTask, Managers, StropUsers);
            taskWindow.Closed += taskWindow_Closed;
            IsOperating        = true;
            taskWindow.Show();
        }
Esempio n. 3
0
        private void newTask_Click(object sender, RoutedEventArgs e)
        {
            CranTaskInfo newTask = new CranTaskInfo();

            newTask.init          = true;
            newTask.TaskAction    = CranTaskAction.create;
            newTask.canChange     = true;
            newTask.canCheck      = false;
            newTask.CranNumber    = 0;
            newTask.Comment       = "";
            newTask.TaskState     = CranTaskState.created;
            newTask.NeedStartDate = DateTime.Now.Date.AddDays(1).AddHours(8);
            newTask.NeedEndDate   = DateTime.Now.Date.AddDays(1).AddHours(12);
            newTask.SelAuthor     = WebContext.Current.User.Name;
            CranWindow taskWindow = new CranWindow();

            taskWindow.init(newTask, Managers, StropUsers);
            taskWindow.Closed += taskWindow_Closed;
            IsOperating        = true;
            taskWindow.Show();
        }
Esempio n. 4
0
		private void btnChange_Click(object sender, RoutedEventArgs e) {
			if (CurrentTask == null)
				return;
			CranWindow taskWindow = new CranWindow();
			taskWindow.init(CurrentTask,Managers);
			taskWindow.Closed += taskWindow_Closed;
			taskWindow.Show();
		}
Esempio n. 5
0
		private void newTask_Click(object sender, RoutedEventArgs e) {
			CranTaskInfo newTask  = new CranTaskInfo();
			newTask.init = true;
			newTask.canChange = true;
			newTask.canCheck = false;
			newTask.CranNumber = 0;
			newTask.Comment = "";
			newTask.NeedStartDate = DateTime.Now.Date.AddDays(1);
			newTask.NeedEndDate = DateTime.Now.Date.AddDays(2);
			CranWindow taskWindow = new CranWindow();
			taskWindow.init(newTask,Managers);
			taskWindow.Closed += taskWindow_Closed;
			taskWindow.Show();
		}