Пример #1
0
        public override object Do(object obj)
        {
            CreateProject bpObj = (CreateProject)obj;

            Project.EntityKey Project_Key = null;
            if (bpObj != null)
            {
                Project_Key = CreateProjects(bpObj);
            }
            return(Project_Key);
        }
Пример #2
0
 /// <summary>
 ///根据订单号 创建项目档案
 /// </summary>
 /// <param name="bpObj"></param>
 public Project.EntityKey CreateProjects(CreateProject bpObj)
 {
     using (ISession session = Session.Open())
     {
         Project p = Project.Create();
         p.Code = bpObj.OrderNo;
         p.Name = bpObj.OrderNo;
         p.DescFlexField.PrivateDescSeg1 = bpObj.CustomerNo;//客户订单号
         p.Org       = UFIDA.U9.Base.Context.LoginOrg;
         p.StartDate = DateTime.Now;
         p.EndDate   = DateTime.MaxValue;
         session.Commit();
     }
     Project.EntityKey Project_Key = Project.Finder.Find("Code=@Code", new OqlParam(bpObj.OrderNo)).Key;
     return(Project_Key);
 }