/// <summary> /// Insert or Update Rights for Role & module /// </summary> /// <param name="module"></param> public static void InsertUpdateRoleModuleRight(VaaaN.MLFF.Libraries.CommonLibrary.CBE.RoleModuleRightActivityCBE module) { string spName = string.Empty; try { if (module.Id == 0) { // Insert rec spName = Constants.oraclePackagePrefix + "ROLEMODRIGHT_INSERT"; } else { //update rec spName = Constants.oraclePackagePrefix + "ROLEMODRIGHT_UPDATE"; } DbCommand command = VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.GetStoredProcCommand(spName); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_ROLE_ID", DbType.Int32, module.RoleId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_ENTRY_ID", DbType.Int32, module.Id, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_MODULE_ID", DbType.Int32, module.ModuleId, ParameterDirection.Input)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_MODULE_ADD", DbType.Int32, module.ModuleAdd ? 1 : 0, ParameterDirection.Input, 100)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_MODULE_VIEW", DbType.Int32, module.ModuleView ? 1 : 0, ParameterDirection.Input, 100)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_MODULE_EDIT", DbType.Int32, module.ModuleEdit ? 1 : 0, ParameterDirection.Input, 100)); command.Parameters.Add(VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.CreateDbParameter(ref command, "P_MODULE_DELETE", DbType.Int32, module.ModuleDelete ? 1 : 0, ParameterDirection.Input, 100)); VaaaN.MLFF.Libraries.CommonLibrary.DBA.DBAccessor.ExecuteNonQuery(command); } catch (Exception ex) { throw ex; } }
/// <summary> /// Insert or Update Rights for Role & module /// </summary> /// <param name="module"></param> public static void InsertUpdateRoleModuleRight(VaaaN.MLFF.Libraries.CommonLibrary.CBE.RoleModuleRightActivityCBE module) { VaaaN.MLFF.Libraries.CommonLibrary.DAL.RoleModuleRightDAL.InsertUpdateRoleModuleRight(module); }