Exemple #1
0
        public void CommitEvent(object key)
        {
            string str = ConfigHelper.Get("IsWBSRelevance");
            BudTaskChangeService   service  = new BudTaskChangeService();
            BudTaskService         service2 = new BudTaskService();
            BudTaskResourceService service3 = new BudTaskResourceService();

            cn.justwin.Domain.Entities.BudTaskChange   byId      = service.GetById(key.ToString());
            IList <cn.justwin.Domain.Entities.BudTask> byProject = service2.GetByProject(byId.PrjId, 0x3e7);
            IList <int> years = service2.GetYears(byId.PrjId);

            if (years != null)
            {
                foreach (int num in years)
                {
                    IList <cn.justwin.Domain.Entities.BudTask> yearTask = service2.GetYearTask(byProject, num);
                    foreach (cn.justwin.Domain.Entities.BudTask task in yearTask)
                    {
                        service2.Add(task);
                    }
                    foreach (int num2 in service2.GetMonths(yearTask, num))
                    {
                        foreach (cn.justwin.Domain.Entities.BudTask task2 in service2.GetMonthTasks(yearTask, num, num2))
                        {
                            service2.Add(task2);
                        }
                    }
                }
            }
            if (str == "1")
            {
                service3.AddTaskResource(byId.PrjId);
            }
        }
Exemple #2
0
    private void SetBudFlowState()
    {
        BudTaskChangeService budTaskChangeService = new BudTaskChangeService();
        BudTaskChange        byPrj = budTaskChangeService.GetByPrj(this.prjId);

        if (byPrj != null && byPrj.FlowState.HasValue)
        {
            this.hfldBudFlowState.Value = byPrj.FlowState.ToString();
        }
    }
    private void SetBudFlowState()
    {
        BudTaskChangeService budTaskChangeService = new BudTaskChangeService();

        cn.justwin.Domain.Entities.BudTaskChange byPrj = budTaskChangeService.GetByPrj(this.prjId);
        int num = -1;

        if (byPrj != null && byPrj.FlowState.HasValue)
        {
            num = byPrj.FlowState.Value;
        }
        this.hfldBudFlowState.Value = num.ToString();
    }