예제 #1
0
        private void cmsiEditRole_Click(object sender, EventArgs e)
        {
            DlgEditBusinessRole dlg = new DlgEditBusinessRole();

            dlg.Role = BusinessServcie.GetBusinessRole(CurrRole.ID);
            if (DialogResult.OK == dlg.ShowDialog())
            {
                try
                {
                    BusinessServcie.SaveBusinessRole(dlg.Role);
                    RefreshBusinessTree();
                    MainForm.INFO("编辑业务角色成功!");
                }
                catch (Exception ex)
                {
                    MainForm.ERROR("编辑业务角色失败!" + ex.Message);
                }
            }
        }
예제 #2
0
        private void cmsiAddRole_Click(object sender, EventArgs e)
        {
            SYS_BUSINESSROLE newRole = new SYS_BUSINESSROLE();

            newRole.CREATETIME      = DateTime.Now;
            newRole.REF_BUSINESS_ID = CurrBusiness.ID;
            DlgEditBusinessRole dlg = new DlgEditBusinessRole();

            dlg.Role = newRole;
            if (DialogResult.OK == dlg.ShowDialog())
            {
                try
                {
                    BusinessServcie.SaveBusinessRole(dlg.Role);
                    RefreshBusinessTree();
                    MainForm.INFO("添加业务角色成功!");
                }
                catch (Exception ex)
                {
                    MainForm.ERROR("添加业务角色失败!" + ex.Message);
                }
            }
        }