public BenefitsAdministrationChildWindows(FormTypes action, string welfareInfoId) { InitializeComponent(); this.actions = action; this.welfareInfoID = welfareInfoId; this.Loaded += (sender, args) => { #region 原来的 InitEvent(); InitData(); Utility.CbxItemBinders(cbWelfareID, "WELFAREPROID", "0"); cobPostId.SelectedIndex = -1; cobPostLevle.SelectedIndex = -1; if (action == FormTypes.New) { wssc.GetBenefitsAdministrationDetailsAsync(InfoObj.WELFAREPROID, InfoObj.COMPANYID, InfoObj.WELFAREID); //获取明细 client.GetEmployeeDetailByIDAsync(Common.CurrentLoginUserInfo.EmployeeID); //获取当期用户信息 this.StartTime.Text = string.Empty; this.EndTime.Text = string.Empty; //this.audit.Visibility = Visibility.Collapsed; } if (action == FormTypes.Audit || action == FormTypes.Browse) { SetButtonVisible(); ShieldedControl(); } #endregion }; }