private void btnOK_Click(object sender, EventArgs e) { PrivilegeService proxy = Common.Util.CreateProxy(); using (proxy as IDisposable) { try { NFC.Management.PublicTrans.BeginTransaction(); int ret = proxy.SaveAuthorityPrivOrg(currentUser, privOrgDictionary); if (ret == 1) { MessageBox.Show("保存成功!"); } NFC.Management.PublicTrans.Commit(); } catch (Exception ex) { NFC.Management.PublicTrans.RollBack(); throw ex; } } base.Close(); }