Beispiel #1
0
        private void bnOK_Click(object sender, EventArgs e)
        {
            if (Check() == -1)
            {
                return;
            }
            Role _role = GetValue();

            try
            {
                FrameWork.Management.PublicTrans.BeginTransaction();

                PrivilegeService _proxy = Common.Util.CreateProxy();
                using (_proxy as IDisposable)
                {
                    _current = _proxy.SaveRole(_role, _newUserID);
                }
                FrameWork.Management.PublicTrans.Commit();
            }
            catch (Exception ex)
            {
                _current = null;
                FrameWork.Management.PublicTrans.RollBack();

                MessageBox.Show(ex.Message);
                return;
            }

            _newUserID = new List <string>();
            MessageBox.Show("保存成功!", "提示");
        }