Exemplo n.º 1
0
 public ActionResult MyApproval()
 {
     ViewBag.Types = BDefineRepository.SelDefines(new BDefine {
         Type = CommonConstant.DEFINE_TYPE
     });
     ViewBag.Status = BPolicyRepository.SelBPolicy(new BPolicy {
         Type = CommonConstant.TYPE_APPROVAL_TASK
     });
     return(View());
 }
Exemplo n.º 2
0
        public static PmsProject SelPmsObject(PmsProject _param)
        {
            if (_param.Type == null)
            {
                _param.Type = PmsConstant.TYPE_PROJECT;
            }
            PmsProject pmsProject = DaoFactory.GetData <PmsProject>("Pms.SelPmsProject", _param);

            pmsProject.BPolicy = BPolicyRepository.SelBPolicy(new BPolicy {
                Type = pmsProject.Type, OID = pmsProject.BPolicyOID
            }).First();
            pmsProject.Calendar = CalendarRepository.SelCalendar(new Calendar {
                Type = CommonConstant.TYPE_CALENDAR, OID = pmsProject.CalendarOID
            });
            PmsRelationship Member = PmsRelationshipRepository.SelPmsRelationship(new PmsRelationship {
                Type = PmsConstant.RELATIONSHIP_MEMBER, RootOID = pmsProject.OID, RoleOID = BDefineRepository.SelDefine(new BDefine {
                    Module = PmsConstant.MODULE_PMS, Type = CommonConstant.DEFINE_ROLE, Name = PmsConstant.ROLE_PM
                }).OID
            }).First();

            pmsProject.PMNm = PersonRepository.SelPerson(new Person {
                OID = Member.ToOID
            }).Name;
            return(pmsProject);
        }