Exemplo n.º 1
0
 void InitData()
 {
     tasksData     = KanbanHelper.LoadTasks(); //  假的,没啥鸡巴用
     employeesData = KanbanHelper.LoadEmployees();
     membersData   = KanbanHelper.LoadMembers();
     checklistData = KanbanHelper.LoadChecklist();
     KanbanHelper.ProcessMembersPhoto(employeesData);
     //gridControl.DataSource = tasksData;
 }
Exemplo n.º 2
0
        public Frm临时任务看板(String taskTemplateId)
        {
            InitializeComponent();
            this.taskTemplateId = taskTemplateId;

            //  看板
            InitData();
            tileView.OptionsEditForm.CustomEditFormLayout = new KanbanEditControl(tileView, employeesData, membersData, checklistData);
            checkBadge     = KanbanHelper.CreateCheckBadge(Color.Gray);
            checkBadgeDone = KanbanHelper.CreateCheckBadge(GetLabelColor(TaskLabel.Green));
        }
Exemplo n.º 3
0
        void AddNewCard(TaskStatus status)
        {
            string newCaption = XtraInputBox.Show("", "新建任务", "新建任务");

            if (String.IsNullOrEmpty(newCaption))
            {
                return;
            }
            var newRow = KanbanHelper.CreateNewTask();
            int maxId  = tasksData.OrderByDescending(x => x.Id).ToList()[0].Id;

            newRow.Id      = maxId + 1;
            newRow.Status  = status;
            newRow.Caption = newCaption;
            tasksData.Add(newRow);
            tileView.FocusedRowHandle = tileView.GetRowHandle(tasksData.IndexOf(newRow));
            RemoveEmptyItem(newRow.Status);
        }
Exemplo n.º 4
0
        public Frm临时任务看板(String taskTemplateId, String empId)
        {
            InitializeComponent();
            this.taskTemplateId = taskTemplateId;
            this.currentEmpId   = empId; //  当前用户赋值

            //  看板
            InitData();
            tileView.OptionsEditForm.CustomEditFormLayout = new KanbanEditControl(tileView, employeesData, membersData, checklistData);
            checkBadge     = KanbanHelper.CreateCheckBadge(Color.Gray);
            checkBadgeDone = KanbanHelper.CreateCheckBadge(GetLabelColor(TaskLabel.Green));

            //  按照管理层级筛选
            foreach (Enum管理层级 type in Enum.GetValues(typeof(Enum管理层级)))
            {
                this.repositoryItemComboBoxFilter.Items.Add(type.ToString());
            }
            this.repositoryItemComboBoxFilter.SelectedIndexChanged += TaskTemplateSelectedIndexChanged;
        }
Exemplo n.º 5
0
 void RemoveEmptyItem(TaskStatus status)
 {
     KanbanHelper.RemoveEmptyItem(tasksData, status);
 }
Exemplo n.º 6
0
 void AddEmptyItem(TaskStatus status)
 {
     KanbanHelper.AddEmptyItem(tasksData, status);
 }