private void cmsDelUser_Click(object sender, EventArgs e) { //当前选中的用户 ORUP_USERORGANIZATION uo = treeUserOrg.FocusedNode.Tag as ORUP_USERORGANIZATION; UserService.DelUserOrg(uo.ID); RefreshUserOrgTree(CurrOrg); }
public ORUP_USERORGANIZATION SaveUserOrg(int UserId, int OrgId) { ORUP_USERORGANIZATION uo = new ORUP_USERORGANIZATION(); uo.ID = ValueOperator.CreatePk("ORUP_USERORGANIZATION"); uo.USERID = UserId; uo.ORGANIZATIONID = OrgId; using (ORMHandler orm = Zxl.Data.DatabaseManager.ORMHandler) { orm.Save(uo); return(uo); } }