Exemplo n.º 1
0
        public async Task <int> Add(FormChangeInfo FormChange)
        {
            var entity = new FormChangeEntity(FormChange);

            entity.CreateDate = DateTime.Now;
            entity.IsDelete   = false;
            this._DB.Add(entity);

            foreach (var attachID in FormChange.AttachIDs)
            {
                AddAttach(entity.ID, attachID);
            }

            var pid = ProcessEngine.Instance.CreateProcessInstance("Form_Change", FormChange.CreateUserID, FormChange.FlowData);

            // 映射流程实例和卷册关系
            _IObjectProcessService.Add(new ObjectProcessEntity()
            {
                ObjectID  = entity.ID,
                ObjectKey = "FormChange",
                ProcessID = new Guid(pid)
            });

            await ProcessEngine.Instance.Start(pid);

            return(entity.ID);
        }
Exemplo n.º 2
0
        public FormChangeInfo Get(int ID)
        {
            var changeInfo = new FormChangeInfo(this._DB.Get(ID));

            changeInfo.Engineering  = _PMContext.EngineeringEntity.Find(changeInfo.EngineeringID);
            changeInfo.Volume       = _PMContext.EngineeringVolumeEntity.Find(changeInfo.VolumeID);
            changeInfo.MainCustomer = _PMContext.CustomerEntity.Find(changeInfo.MainCustomerID);
            changeInfo.CopyCustomer = _PMContext.CustomerEntity.Find(changeInfo.CopyCustomerID);

            return(changeInfo);
        }
Exemplo n.º 3
0
 public FormChangeEntity(FormChangeInfo Info)
 {
     this.ID             = Info.ID;
     this.EngineeringID  = Info.EngineeringID;
     this.SpecialtyID    = Info.SpecialtyID;
     this.VolumeID       = Info.VolumeID;
     this.AttachID       = Info.AttachID;
     this.Reason         = Info.Reason;
     this.Content        = Info.Content;
     this.MainCustomerID = Info.MainCustomerID;
     this.CopyCustomerID = Info.CopyCustomerID;
     this.CreateDate     = Info.CreateDate;
     this.CreateUserID   = Info.CreateUserID;
     this.IsDelete       = Info.IsDelete;
 }
Exemplo n.º 4
0
 public async Task <int> Create(FormChangeInfo Info)
 {
     Info.CreateUserID = int.Parse(base.User.Identity.Name);
     return(await this._IFormChangeService.Add(Info));
 }