public void ResignController(Guid ip_guid_function) { var uow = new UnitOfWork(); var v_phan_quyen = new HT_PHAN_QUYEN_CHUC_NANG() { ID = ip_guid_function, State = EDataState.Deleted }; uow.Repository <HT_PHAN_QUYEN_CHUC_NANG>().Delete(v_phan_quyen); uow.Save(); }
private CChucNangModel Copy2ChucNangModel(HT_PHAN_QUYEN_CHUC_NANG ip_obj_phan_quyen) { var lp_result = ip_obj_phan_quyen.CopyAs <CChucNangModel>(); if (ip_obj_phan_quyen.HT_CONTROLLER != null) { lp_result.HAS_LINK = true; lp_result.CONTROLLER_NAME = ip_obj_phan_quyen.HT_CONTROLLER.CONTROLLER_NAME; lp_result.ACTIVITY_NAME = ip_obj_phan_quyen.HT_CONTROLLER.ACTIVITY_NAME; } else { lp_result.HAS_LINK = false; } return(lp_result); }
public void AssignController(Guid ip_guid_role, Guid ip_guid_controller, Guid?ip_guid_control_parent , string ip_str_hien_thi, string ip_str_icon, bool ip_b_hien_thi_menu) { var uow = new UnitOfWork(); var v_phan_quyen = new HT_PHAN_QUYEN_CHUC_NANG() { ID = Guid.NewGuid(), ID_HT_CONTROLLER = ip_guid_controller, TRANG_THAI_YN = true, VI_TRI = 1000, ID_HT_USER_GROUP = ip_guid_role, HIEN_THI_YN = ip_b_hien_thi_menu, HIEN_THI_MENU = ip_str_hien_thi, ICON_CLASS = ip_str_icon, ID_CHUC_NANG_CHA = ip_guid_control_parent, State = EDataState.Added }; uow.Repository <HT_PHAN_QUYEN_CHUC_NANG>().Insert(v_phan_quyen); uow.Save(); }