示例#1
0
        protected virtual void ChangeForm(string formName)
        {
            if (_mContracte == null)
            _mContracte = UiFactory.GetUserControl("Contracte") as UcContracte;

            if (_mContracte != null) _mContracte.OnContractSaveEventHandler += CallBackFromContracte;

            if (UserControlChanging != null)
            {
                UserControlChanging(formName, new UserControlEventArgs {UsControlName = formName});
            }
            //UserControlChanging?.Invoke(formName,new UserControlEventArgs() {UsControlName = this });
        }
示例#2
0
 private void CallBackFromContracte(object sender, UserControlEventArgs arg)
 {
     FillCombobox();
     ChangeForm(arg.UsControlName);
     if (_mContracte == null) return;
     _mContracte.OnContractSaveEventHandler -= CallBackFromContracte;
     _mContracte = null;
 }