protected override void OnAuditing(object sender, AuditEventArgs e) { try { this.OrderEntity.FBEntity.CollectionEntity.Clear(); var posts = (this.OrderEntity.LoginUser as LoginUserData).PostInfos; EmployeerData ownerInfo = this.OrderEntity.GetOwnerInfo(); var finds = posts.Where(item => item.Company.Value.ToString() == ownerInfo.Company.Value.ToString()); if (finds.Count() > 0) { var user = finds.FirstOrDefault(); AuditControl ac = sender as AuditControl; ac.AuditEntity.CreateCompanyID = user.Company.Value.ToString(); ac.AuditEntity.CreateDepartmentID = user.Department.Value.ToString(); ac.AuditEntity.CreatePostID = user.Post.Value.ToString(); } base.OnAuditing(sender, e); } catch (Exception ex) { e.Result = AuditEventArgs.AuditResult.Cancel; CommonFunction.ShowErrorMessage("提交或审核异常, " + ex.ToString()); } }
public void UpdateRecords(CheckListRecords record) { var control = new AuditControl(record); control.DisableControls(checkBoxAudit.Checked); control.Deleted += Control_Deleted; flowLayoutPanel1.Controls.Remove(linkLabel1); flowLayoutPanel1.Controls.Add(control); flowLayoutPanel1.Controls.Add(linkLabel1); }
public void UpdateRecords(CheckListRecords record) { var control = new AuditControl(record); if (!_enable) { control.DisableControls(); } flowLayoutPanel1.Controls.Remove(linkLabel1); flowLayoutPanel1.Controls.Add(control); flowLayoutPanel1.Controls.Add(linkLabel1); }
private void AuditCtrl_Auditing(object sender, AuditControl.AuditEventArgs e) { ShowProgressBar(); if (EntityEditor is IAuditing) { ((IAuditing)EntityEditor).OnAuditing(e); } }